Skip to content
GitHubLogin

Agent SDK Quickstart

Get started using the 8080 Agent SDK.

The 8080 Agent SDK provides a framework that helps you define and deploy your agents while abstracting away details of the agent loop.

To start, just define your agent with the model, instruction, and tools.

from e80_sdk.agents.harness import run_agent_async
from e80_sdk.agents.data import Agent, State, Message
from e80_sdk.agents.toolbox import Toolbox
result = await run_agent_async(
State(
agent=Agent(
name="Comedian Agent",
model="openrouter/qwen/qwen3-32b",
instructions="You are a comedian",
tools=[],
),
message_history=[
Message(
role="user",
content="Tell me a joke about squirrels."
)
]
),
Toolbox.get_global_instance()
)
print(result.llm_response.content)

To continue the conversation, pass back the new state from the return value of run_agent_async.

Note that the state is serializable, so you can serialize it and store it or send it.

# Obtain the state from the result of a previous call to `run_agent_async`
# result = await run_agent_async(...)
# new_state = result.state
# Deserialize the state from the network or datastore:
#
# state_serialized = ...
# new_state = State.model_validate_json(state_serialized)
new_state.message_history.append(Message(
role="user",
content="Tell me another joke aboue pigeons."
))
result = await run_agent_async(new_state)
print(result.llm_response.content)

You can define a tool as a Python function.

from e80_sdk.agents.harness import run_agent_async
from e80_sdk.agents.data import Agent, State
from e80_sdk.agents.tools.function import function_tool
@function_tool
def foobar(first_number: int, second_number: int):
return first_number + second_number
result = await run_agent_async(
State(
agent=Agent(
name="Comedian Agent",
model="openrouter/qwen/qwen3-32b",
instructions="You are a comedian",
tools=[foobar.get_definition()],
),
message_history=[
Message(
role="user",
content="Run the foobar operator on 1 and 2."
)
]
),
Toolbox.get_global_instance()
)
print(result.llm_response.content)

Handoffs to other agents are defined as tools.

from e80_sdk.agents.harness import run_agent_async
from e80_sdk.agents.data import Agent, State
from e80_sdk.agents.tools.function import function_tool
@function_tool
def foobar(first_number: int, second_number: int):
return first_number + second_number
result = await run_agent_async(
State(
agent=Agent(
name="Guessor",
model="openrouter/qwen/qwen3-32b",
instructions=(
"'Animal Agent' is thinking of an animal. Keep guessing animals with
"'Animal Agent' until you guess the animal they are thinking of."
),
tools=[
DelegateAgentToolHandler.get_definition(
agent=Agent(
name="Animal Agent",
instructions=(
"You are thinking of an animal. Don't say what the animal you are thinking of is."
" When guesses an animal, say they are correct if they guessed the animal, or give a"
" hint if they guessed wrong."
),
model="openrouter/qwen/qwen3-32b",
tools=[],
),
delegate_description="Enter an animal that you'd like to guess.",
continue_description="Continue guessing animals",
)
],
),
message_history=[
Message(
role="user",
content="Guess an animal."
)
]
),
Toolbox.get_global_instance()
)
print(result.llm_response.content)