Choosing an Adapter
Adapter | Use when… | Strengths | Things to watch |
---|---|---|---|
openai | You have an OpenAI or Azure OpenAI chat model. | Minimal setup, native tool calling, streaming support. | Only works with OpenAI-compatible APIs. |
http_api | Your agent already runs behind an HTTP endpoint. | Language-agnostic, deploy-anywhere. | You define the payload schema, handle auth, and parse responses. |
python | You want to call local functions or LangChain runnables directly. | Lowest latency, easy debugging. | Runs inside the orchestrator process—ensure your code is safe and performant. |
OpenAI Adapter (atlas/agent/openai_adapter.py
)
This is the fastest way to get started, especially with GPT-4o-mini or Azure OpenAI models.
- Supports conversation history and tool call metadata automatically.
- Accepts
response_format
for JSON mode. - For Claude, Gemini, or other models, use the
http_api
adapter.
HTTP Adapter (atlas/agent/http_adapter.py
)
Best for microservices, serverless functions, or non-Python agents.
payload_template
: The base JSON payload; the adapter injects theprompt
and optional metadata.result_path
: A list of keys to traverse in the JSON response to find the agent’s output string.- Auth & retries: Handled via the
transport
block, which mirrorshttpx
settings.
Python Adapter (atlas/agent/python_adapter.py
)
Ideal when your agent is a local Python function or a LangChain runnable.
- The adapter imports the
attribute
(e.g.,run_agent
) from theimport_path
module. - If the callable is async, the adapter awaits it; sync functions run in a background thread.
- Set
allow_generator: true
to let the adapter consume a generator, concatenating all yielded strings into a single output.
Building Custom Adapters
All adapters share a minimal interface (AgentAdapter
). To add a new one (e.g., for gRPC), follow these steps:
- Extend the
AdapterType
enum inatlas/config/models.py
. - Implement a class inheriting from
AgentAdapter
. - Register it in
atlas/agent/__init__.py
.
http_api
adapter and swapping the transport layer.
Decision Checklist
Need | Recommendation |
---|---|
Fastest time-to-first-run | openai adapter with sdk_quickstart.yaml . |
Reuse an existing microservice | http_api adapter with proper retries and auth. |
Full control in local experiments | python adapter calling your local function. |
Access non-OpenAI APIs (Claude, Gemini, etc.) | Wrap them with the http_api adapter. |
Next Steps
- Configure the rest of the runtime in
SDK Configuration
. - See how the orchestrator uses your adapter in
How Orchestration Works
. - Clarify Student vs Teacher responsibilities in
Student & Teacher Roles
.