Module project

Module project 

Source
Expand description

Generate a project around a SessionSpec in Rust, Python or Go.

The spec stays the agent: model, instruction, conversation, tool declarations and tests, as data in agent.json. A generated project adds what data cannot carry, the tool implementations, as one typed function per tool the spec declares as a mock. Each function returns the spec’s mock response until its body is replaced, so a fresh project behaves exactly like the spec does offline.

  • Rust registers the functions in process with SpecResources::implement and runs the session itself.
  • Python and Go serve the functions as an MCP tool server over stdio. The project’s agent.json points each of those tools at the server through its mcp binding, and any runtime that loads the spec (adk spec run, the runtime server) calls them there.

In every language the declaration in agent.json is what the model sees, and the spec’s set_state and save_response_as still apply.

Structs§

ProjectFile
One file of a generated project.
ProjectOptions
Options for SessionSpec::to_project_with.

Enums§

ProjectLanguage
The language of a generated project.
SdkSource
Where a generated Rust project gets the SDK crates.

Constants§

GO_TOOL_SERVER
The command a Go project’s agent.json uses to start its server.
PYTHON_TOOL_SERVER
The command a Python project’s agent.json uses to start its server.