Skip to main content

Your First Agent

Create and run a minimal custom agent using the agenticstar-platform SDK.

Prerequisites

  • Python 3.12 or later
  • pip

Steps

1. Install the SDK

curl
pip install agenticstar-platform

2. Create an Agent

Create my_agent.py:

Python
from agenticstar import Agent, AgentConfig

config = AgentConfig(
name="my-first-agent",
description="My first custom agent",
llm_model="gpt-4",
)

class MyAgent(Agent):
async def run(self, message: str) -> str:
# Call the LLM to generate a response
response = await self.llm.chat(message)
return response.content

if __name__ == "__main__":
agent = MyAgent(config)
agent.serve()

3. Start the Agent

curl
python my_agent.py

The agent starts at http://localhost:8000.

4. Test It

curl
curl -X POST http://localhost:8000/chat \
-H "Content-Type: application/json" \
-d '{"message": "Hello"}'

Next Steps