Small pieces for tool-using agents

An agent loop you can read.

A Python framework for model calls, typed tools, conversation memory and middleware, with an OpenAI-compatible client.

pyagentPROJECT OVERVIEW
01Define a tool
02Run the agent
03Inspect the result

Illustrated workflow · not a live application session

01 / Inside the project

Built around the work.

Start with the implemented workflow, then follow the source to understand how it works.

01

Define tools

Describe Python functions with the tool decorator and keep execution explicit.

02

Connect a model

Use an OpenAI-compatible endpoint and configure the provider yourself.

03

Inspect the loop

Agent, parsing, memory and middleware live in separate, readable modules.

02 / Explore the workflow

Three steps to understand it.

Define tools

Describe Python functions with the tool decorator and keep execution explicit.

Full setup and implementation ↗
03 / Run it yourself

Start from the source.

See pyproject.toml for supported Python versions. The example requires an API key or a configured local endpoint.

Clone the repository and run these commands from its root. Review the README before connecting external services.

Open repository ↗
SOURCE CHECKOUT
git clone https://github.com/honeyamn10-source/pyagent.git
cd pyagent
python -m pip install .
python examples/calculator_agent.py
04 / Know the scope

Clear expectations.

Model quality and costs depend on the provider. Tools run with the permissions you give their Python process; this library is not an operating-system sandbox.

Check the latest results in GitHub Actions. A passing automated check covers its tested paths, not every real-world integration.

Keep exploring