A small Python CLI agent using OpenAI's Responses API. It can answer normally and call local tools for:
- current time
- safe arithmetic
- saving notes
- listing saved notes
- reading saved notes
OpenAI's current quickstart shows the Responses API for model calls, environment-based API keys, and tool use. It also points to the Agents SDK when you need heavier orchestration. This starter keeps the first version simple so you can understand the tool loop before adding more layers.
cd C:\Users\veera\ai-agent-project
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .envEdit .env and replace your_api_key_here with your OpenAI API key.
python agent.pyTry:
What time is it?
Calculate (42 * 19) / 7
Save a note called project ideas saying Build a travel planner agent.
List my notes.
Read my project ideas note.
ai-agent-project/
agent.py Main CLI and tool loop
requirements.txt Python dependencies
pyproject.toml Project metadata
.env.example Environment variable template
data/ Created at runtime for local notes
- Web search tool
- File upload and summarization
- A Streamlit or FastAPI web UI
- Database-backed memory
- Multiple specialist agents with handoffs
- OpenAI quickstart: https://platform.openai.com/docs/quickstart/make-your-first-api-request
- OpenAI models page: https://platform.openai.com/docs/engines/chat-gpt