DoublewordDoubleword

atomic-agents

atomic-agents uses Instructor (which wraps the OpenAI client), so it supports custom endpoints by passing a configured client.

Install

pip install atomic-agents openai instructor

Configure

import instructor
from openai import OpenAI
from atomic_agents import AtomicAgent, AgentConfig

client = instructor.from_openai(
    OpenAI(
        base_url="https://api.doubleword.ai/v1",
        api_key="{{apiKey}}",
    )
)

agent = AtomicAgent(
    config=AgentConfig(
        client=client,
        model="{{selectedModel.id}}",
    )
)

response = agent.run(agent.input_schema(chat_message="Say hello."))
print(response.chat_message)

The base_url and api_key are standard openai.OpenAI constructor parameters. instructor.from_openai() wraps the client for structured output support.