You can build an agent harness from scratch around a model API, or use an SDK or framework that provides one.
Building Your Own
A basic loop is short: call the model, run tool calls, append results, repeat. Building your own gives full control and understanding, with no framework abstractions to debug.
Using an SDK or Framework
Agent SDKs and frameworks provide:
- The agent loop and tool execution.
- Tool definition helpers and schema validation.
- Context management and compaction.
- Permissions, hooks and sandboxing.
- Sub-agents and multi-agent orchestration.
- Tracing and observability.
- Integrations with protocols such as MCP.
Choosing
- Transparency: can you see and change the prompts it sends?
- Fit: does it support your models, tools and deployment?
- Maturity: documentation, community and stability.
- Lock-in: how hard is it to move away?
Advice
Start with the simplest approach that works. Heavy abstraction can hide what the model actually sees, making problems hard to diagnose. Whichever route you take, understand the underlying loop.