Reference · generated from the package
API reference
Generated by introspecting the installed beam_agents package — signatures, type annotations, and docstrings come from the code, not from prose written alongside it.
What this covers
Only the names beam_agents/__init__.py re-exports. The project documents everything else as private, and this page does not present private modules as API.
Public surface
16 names, each with a page of its own.
A symbol page carries the signature the package actually declares, its docstring verbatim, and a link to the line it is defined on.
- AdkAgentclass
Wraps a Google ADK agent (an
LlmAgent/BaseAgenttree) as a runtime - AgentConfigdataclass
Immutable, self-validating
RunAgentconfiguration. - Denydataclass
Emit deterministic bytes on the main output and end the suspension.
- Dropdataclass
Emit nothing on the main output; record the timeout on
.errors. - Escalatedataclass
Ask again, louder: stage a fresh approval intent and extend the deadline.
- FallbackContextdataclass
Passed to the HITL policy when a pending approval/result times out.
- HitlPolicydataclass
Configuration for suspensions, approvals, and what a timeout does.
- LangGraphAgentclass
Wraps a LangGraph graph (a
StateGraphbuilder or an already-compiledRequires the langgraph extra
- PydanticAIAgentclass
Wraps a user-constructed
pydantic_ai.Agentas a runtime agent. - RunAgentclass
Run
agentas a keyed stateful transform over a pre-keyed envelope stream. - RunAgentOutputsdataclass
RunAgent's named outputs: main, the three tagged streams, and the - ShardKeysclass
Fan a hot logical key across
nphysical shards, upstream ofRunAgent. - StreamAgentclass
The agent-authoring runtime contract: one async entry point.
- shard_keyfunction
Return the physical shard key
key + b"#" + <index>forpayload. - toolfunction
Register a callable as a
Tool. Usable bare (@tool) or parameterized - unshard_keyfunction
Return the logical key behind a physical shard key.
Outside the public surface
Writing an agent today means importing private modules.
That gap is real and worth knowing before you depend on it: these names carry no stability promise, and one of them is underscore-prefixed. The site’s examples import from this list and nothing else — a test enforces it.
| Module | Why it is needed |
|---|---|
| beam_agents._protos | Generated protobuf bindings, including AgentEnvelope — the input element type RunAgent requires. Underscore-prefixed, yet unavoidable when constructing pipeline input. |
| beam_agents.core.agent | Activation outcomes (Complete, Suspend) and the agent protocols. An agent function cannot be written without these. |
| beam_agents.core.context | ActivationContext — the object every agent receives. Its methods (act, call_model, run_tool, emit, memory) are the runtime's real authoring surface. |
| beam_agents.model.client | LlmRequest/LlmResponse/ProviderError, the model-call types. |
| beam_agents.model.fake | FakeLLM and its matchers — the model used in tests and examples. |
| beam_agents.tools | @tool and ToolRegistry, needed to declare and register tools. |
Generated from beam_agents 1.0.0a1 by scripts/gen_api_reference.py.