Skip to content

rohans0509/Orbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orbit

A framework for creating, managing, and executing a chain of agents in a graph-like structure.

Installation

You can install the library using pip:

pip install Orbit

Usage

Creating an Agent

from Orbit import Agent

# Define an Agent
agent = Agent(name, instructions, llm_model, input_keys, output_key)
  • name: Name of the agent.
  • instructions: Prompt instructions for the agent.
  • llm_model: Language model for the agent.
  • input_keys: List of input keys.
  • output_key: Output key.

Defining Routes

from Orbit import Route

# Define a Route
route = Route(from_agent, to_agents, route_logic=None)
  • from_agent: Name of the source agent.
  • to_agents: List of destination agent names.
  • route_logic: Route logic.

Creating the Flow

from Orbit import Flow

# Define a Flow
flow = Flow(name="MyGraph")
  • name: Name of the flow.

Adding Agents and Routes

# Add Agents to the Flow
flow.add_agent(agent)

# Add Routes to the Flow
flow.add_route(route)

Setting Entry Point and Compilation

# Set the entry point of the flow
flow.set_entry_point(agent_name)

# Compile the flow
flow.compile()

Running the Flow

# Define initial state
initial_state = {...}

# Run the flow
final_state = flow.run(initial_state)

Saving and Loading the Flow

# Save the flow configuration
flow.save_flow(filename)

# Load the flow configuration
loaded_flow = Flow.load_flow(filename)

About

A framework for creating, managing, and executing a chain of agents in a graph-like structure.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors