Skip to content
beam-agents
GitHub

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.

  • Wraps a Google ADK agent (an LlmAgent/BaseAgent tree) as a runtime

  • AgentConfigdataclass

    Immutable, self-validating RunAgent configuration.

  • 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.

  • Passed to the HITL policy when a pending approval/result times out.

  • HitlPolicydataclass

    Configuration for suspensions, approvals, and what a timeout does.

  • Wraps a LangGraph graph (a StateGraph builder or an already-compiled

    Requires the langgraph extra

  • Wraps a user-constructed pydantic_ai.Agent as a runtime agent.

  • Run agent as a keyed stateful transform over a pre-keyed envelope stream.

  • RunAgent's named outputs: main, the three tagged streams, and the

  • Fan a hot logical key across n physical shards, upstream of RunAgent.

  • The agent-authoring runtime contract: one async entry point.

  • shard_keyfunction

    Return the physical shard key key + b"#" + <index> for payload.

  • 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.

ModuleWhy it is needed
beam_agents._protosGenerated protobuf bindings, including AgentEnvelope — the input element type RunAgent requires. Underscore-prefixed, yet unavoidable when constructing pipeline input.
beam_agents.core.agentActivation outcomes (Complete, Suspend) and the agent protocols. An agent function cannot be written without these.
beam_agents.core.contextActivationContext — the object every agent receives. Its methods (act, call_model, run_tool, emit, memory) are the runtime's real authoring surface.
beam_agents.model.clientLlmRequest/LlmResponse/ProviderError, the model-call types.
beam_agents.model.fakeFakeLLM 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.