Catalog PyPI
PACKAGE EXPLORERView in registry

agentsys

PyPI

An educational multi-agent orchestration framework

agentsaimulti-agentorchestration
Versions collected1
Direct dependencies8From release 0.7.0
Last observed20 Oct, 23:32 UTC

README

Version 0.7.0 documentation

AgentSys Logo

AgentSys (experimental, educational)

License: MIT

AgentSys is currently an experimental sample framework intended to explore ergonomic interfaces for multi-agent systems. It is not intended to be used in production, and therefore has no official support. (This also means we will not be reviewing PRs or issues!)

The primary goal of AgentSys is to showcase the handoff & routines patterns explored in the Orchestrating Agents: Handoffs & Routines cookbook. It is not meant as a standalone library, and is primarily for educational purposes.

Installation

SSH

pip install git+ssh://git@github.com/lifsys/agentsys.git

HTTPS

pip install git+https://github.com/lifsys/agentsys.git

Project Structure

The project is organized into several key modules:

  • agentsys.orchestration: Core orchestration functionality
    • Swarm: Main orchestration class for managing agent interactions
    • Agent: Base class for defining agents
  • agentsys.models: Model interfaces and implementations
    • BaseModel: Abstract base class for model implementations
    • OpenAIModel: OpenAI model implementation
  • agentsys.config: Configuration management
    • Settings: Configuration settings and utilities
  • agentsys.types: Type definitions and data structures
  • agentsys.util: Utility functions and helpers

Basic Usage

from agentsys import Swarm, Agent

client = Swarm()
agent = Agent(
    name="test",
    instructions="You are a helpful assistant.",
    model="gpt-4",
)

messages = [{"role": "user", "content": "Hello!"}]
response = client.run(agent, messages)
print(response.messages[-1]["content"])

Function Calling

AgentSys supports function calling with both OpenAI's function calling and tool calling APIs:

def get_weather(location: str) -> str:
    """Get the weather for a location."""
    return f"The weather in {location} is sunny!"

agent = Agent(
    name="weather",
    instructions="You can help users check the weather.",
    model="gpt-4",
    functions=[get_weather],
)

messages = [{"role": "user", "content": "What's the weather in San Francisco?"}]
response = client.run(agent, messages)
print(response.messages[-1]["content"])

Configuration

You can configure AgentSys using environment variables or by passing a config object:

from agentsys import Settings

settings = Settings(
    openai_api_key="your-api-key",
    temperature=0.7,
)

Swarm Client

The Swarm class is the main entry point for interacting with agents. It handles:

  • Message routing
  • Function calling
  • Response streaming
  • Error handling

Contributing

This is an experimental project and we are not accepting contributions at this time.

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.7.018 Nov 20248

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
lifsys/agentsys

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 23:32 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:729a75b52ed2e628055d987640abe18a7c3626a301a11ae45abe2b16eeb9f272