Skip to main content

beam_core

beam_core provides RiverBeam, the object that runs every invocation, and the BEM-* error catalogue the other crates raise.

beam_core = { path = "../riverbeam/crates/beam_core" }

RiverBeam​

MethodPurpose
new(BeamConfig)A pipeline with in-memory defaults
register_agent(Arc<dyn Agent>), register_echo_agent(name)Add agents
invoke(req) -> Value, invoke_result(req) -> AgentResultRun the pipeline
with_store / set_store, store()Execution store (default InMemoryStore)
with_stream / set_streamPublish stream frames
with_knowledge / set_knowledge, knowledge()Retrieval
set_memory, memory()Memory manager
with_security / set_securitySecurity manager
set_usage(guard, tracker, plan)Quotas
set_auditAudit logger
memory_remember, memory_forgetStore and delete memory facts
ingest_knowledge_document, delete_knowledge_documentKnowledge task bodies (JSON in, JSON out)
checkin_catalog()Write registered agents to the store
list_agents(), registry(), router(), config()Accessors

The phases are described in Invoke pipeline.

BeamConfig​

FieldDefault
worker_namespace"riverbeam-worker"
sql_schema"ref_beam"
knowledge_enabledtrue
knowledge_embedding_dim1536
knowledge_max_context_tokens2000
default_modelNone
security_enabledtrue
usage_enabledtrue

Only default_model changes the pipeline today; see Current limitations.

Errors​

beam_core re-exports RiverbaseError and RiverbaseResult from riverbase_core and declares every BEM-* error as a constant (BEM_020, BEM_061, …). The list is in Error codes.