Skip to main content

beam-crewai

beam-crewai is a small Python package that connects CrewAI agents to Beam Protocol using the beam-directory SDK.

It provides two high-level primitives:

  • BeamTool: a CrewAI-compatible tool for sending natural-language messages to Beam agents
  • BeamAgent: a thin wrapper around the Beam Protocol Python SDK for registration, intent sending, and natural-language conversations

Installation

pip install beam-crewai

Quick Start

1) Create a Beam wrapper

from beam_crewai import BeamAgent

beam = BeamAgent.create(
    agent_name="researcher",
    org_name="acme",
    directory_url="https://api.beam.directory",
    default_recipient="analyst@partner.beam.directory",
)

2) Send a Beam intent

result = beam.send_intent_sync(
    intent="query.status",
    params={"detail": "full"},
)

print(result.success)
print(result.payload)

3) Send a natural-language Beam message

reply = beam.talk_sync("What is the latest account summary?")
print(reply["message"])

Using BeamTool with CrewAI

from crewai import Agent
from beam_crewai import BeamAgent, BeamTool

beam = BeamAgent.create(
    agent_name="ops-assistant",
    org_name="acme",
    directory_url="https://api.beam.directory",
    default_recipient="crm@partner.beam.directory",
)

beam_tool = BeamTool(
    beam_agent=beam,
    description="Send a message to the CRM Beam agent and return the reply.",
)

agent = Agent(
    role="Operations Assistant",
    goal="Fetch information from partner agents over Beam",
    backstory="A CrewAI agent that delegates partner-system questions to Beam agents.",
    tools=[beam_tool],
)

The tool sends a conversation.message request through Beam and returns the remote agent's text response. If the Beam response has no plain-text message, it falls back to serialized structured payload.

API

BeamAgent

  • BeamAgent.create(...): creates a new Beam identity and client
  • BeamAgent.from_identity_data(...): rebuilds a wrapper from exported Beam identity data
  • register(...) / register_sync(...): registers the local Beam agent in the directory
  • send_intent(...) / send_intent_sync(...): sends a Beam intent frame
  • talk(...) / talk_sync(...): sends a natural-language Beam message

BeamTool

  • Accepts message, optional to, optional context, optional language, and timeout_ms
  • Uses the wrapper's default_recipient when to is omitted
  • Raises an error on Beam delivery failures so CrewAI can surface the tool failure

Development

Run the package tests with:

python -m unittest discover -s tests

License

Apache-2.0

Metadata

Release files for beam-crewai 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beam-crewai 0.5.1
File Size Uploaded
beam_crewai-0.5.1.tar.gz 15.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for beam-crewai 0.5.1
File Interpreter ABI Platform
beam_crewai-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 29.4 kB

Release files / beam_crewai-0.5.1.tar.gz

Download URL beam_crewai-0.5.1.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
41487de2172917b83fcb7b2cf2b0376cbae92541c7a947744b0e1ebb7790bb3e
BLAKE2b-256 checksum
How to use checksums
8bccd09cb1907f928cb4a4205a2ee5292ee381d3e12b8137a8d0c386613e7d7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / beam_crewai-0.5.1-py3-none-any.whl

Download URL beam_crewai-0.5.1-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abdfe8392ec96da150b3ac9c35c832dda9f5c7c2444a30c7d6d34b0a129beb2f
BLAKE2b-256 checksum
How to use checksums
19e634e5e85593d461660237d8a6b2009dd412891311f284126e5c0c2be1f2fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page