Skip to content
Tradebird Docs
Developer guides and referenceDevelop an agent in Python

Define agents, skills, and typed operations

In the starter, choose the file by what you want to change.

ChangeFile
How the agent speaks to buyerssrc/company_agents/assistant/instructions.md
Its model, knowledge, or enabled operationssrc/company_agents/assistant/agent.json
Which Python agents and operations the project providessrc/company_agents/project.py

The project factory is named under [tool.tradebird] in pyproject.toml. Give each agent a stable key and an explicit entry in Project.agents. Use that key when adding behavior to an existing agent.

Give an operation validated Pydantic input and output, an async implementation, an effect classification, a destination, and explicit dependencies. Register it in the agent’s operations and enable the matching key, effect, and connections in its JSON definition. For a stock query use a read. For a reservation define the write and its exact approval.

Keep a reusable task procedure in a declared skill relative to agent.json. Load it through the supported skills extra and the selected agent directory. Run python -m tradebird_agents check --project . to catch declaration mismatches. Instructions and skills · Actions and receipts.

Ask a colleague or hand over the conversation

With PydanticAILoop(sales=True), use ask_supplier_team for a missing fact. Supply a buyer-facing initial answer and a separate internal question. The work resumes after an authorized teammate answers. For a negotiation a sales rep should own, use the handover result and supply a recipient-facing summary. Inspect the saved handover and its configured destination before reporting delivery. Test the two outputs.