Guava.Testing (Guava v0.34.0)

Copy Markdown View Source

Drive an agent module against Guava's v1/test-agent endpoint — no phone needed.

Guava.Testing.session(MyAgent, fn session ->
  Guava.Testing.Session.say(session, "Hi, what are your hours?")
  Guava.Testing.Session.wait_for_turn(session)
  Guava.Testing.Session.evaluate(session, ["The agent gave hours."], [])
end)

Or let an LLM roleplay the caller with roleplay/3.

Summary

Functions

Run an automated roleplay where an LLM plays the caller. Returns the (still-running) session so you can Guava.Testing.Session.evaluate/3 then Guava.Testing.Session.stop/1.

Run agent_module against a live test session and pass the session to fun. The session is stopped when fun returns.

Functions

roleplay(agent_module, roleplay_prompt, opts \\ [])

@spec roleplay(module(), String.t(), keyword()) :: pid()

Run an automated roleplay where an LLM plays the caller. Returns the (still-running) session so you can Guava.Testing.Session.evaluate/3 then Guava.Testing.Session.stop/1.

session(agent_module, fun, opts \\ [])

@spec session(module(), (pid() -> result), keyword()) :: result when result: var

Run agent_module against a live test session and pass the session to fun. The session is stopped when fun returns.

Options