Skip to content
AutoGen

Frameworks and SDKs

Use AutoGen with Shannon

Point AutoGen's OpenAIChatCompletionClient at Shannon and describe the model with model_info; agents and tools then run on Shannon models.

  • Tested Nov 7, 2026
  • OpenAI Chat Completions
  • About 2 min

About AutoGen

AutoGen is Microsoft's open-source framework for agents that talk to each other and to tools. AgentChat, its high-level layer, builds assistants and teams on a model client. The OpenAI client takes a base URL and a description of the model, so AutoGen agents can run on Shannon models.

What you need

A Shannon API key
Keys & usage
Base URL
https://api.shannon-ai.com/v1 Endpoint: /v1/chat/completions
Every snippet below follows your choice.

Set it up

  1. Install AgentChat and the OpenAI extension

    Shell
    pip install autogen-agentchat 'autogen-ext[openai]'
  2. Create the client

    AutoGen knows only OpenAI's model names. For any other id, model_info tells it what the model can do; without it, the client raises an error.

    Python
    from autogen_ext.models.openai import OpenAIChatCompletionClient
    
    client = OpenAIChatCompletionClient(
        model="Kimi-K3-uncensored-NVFP4",
        base_url="https://api.shannon-ai.com/v1",
        api_key="YOUR_API_KEY",
        model_info={
            "vision": True,
            "function_calling": True,
            "json_output": True,
            "structured_output": True,
            "family": "unknown",
        },
    )
  3. Run an agent with a tool

    Python
    import asyncio
    from autogen_agentchat.agents import AssistantAgent
    
    async def get_weather(city: str) -> str:
        """Weather for a city."""
        return f"Sunny, 18 C in {city}"
    
    async def main():
        agent = AssistantAgent("assistant", model_client=client, tools=[get_weather])
        result = await agent.run(task="What is the weather in Oslo?")
        print(result.messages[-1].content)
        await client.close()
    
    asyncio.run(main())

Check that it works

Send: Run the agent sample.

You should see: A tool call to get_weather, then its result as the last message.

Models that fit AutoGen

Every id below meets what AutoGen needs. The first one is the default in the snippets.

Model idContext windowMax outputImage input
Kimi-K3-uncensored-NVFP4 1,022,976 262,144 Yes
Kimi-K3-uncensored-3BIT-REAP 225,280 225,280 Yes
shannon-3 196,608 65,536 Yes
shannon-coder-1 131,072 65,536 No

Good to know

  • model_info is required for every id AutoGen does not know, which includes all Shannon ids.
  • create_stream passes the model's reasoning through as text wrapped in <think> tags before the answer; strip it if you show the stream to users.
  • By default AssistantAgent returns the tool's result as its last message; set reflect_on_tool_use=True to have the model write an answer from it, which costs one more request.

Tips

  1. client.create_stream([...]) streams text chunks for a single request.
  2. Set "vision": True only for models that accept images, such as Kimi-K3-uncensored-NVFP4.
  3. One client can serve several agents in a team; close it with await client.close() at the end.

Troubleshooting

SymptomCauseFix
ValueError: model_info is required when model name is not a valid OpenAI model The model id is not one AutoGen knows. Pass model_info as above.
404 Not Found base_url lacks /v1. Use https://api.shannon-ai.com/v1.
401 Unauthorized The key is missing, mistyped or rotated. Copy the key again from Keys & usage; it starts with sk-.
context_length_exceeded / "prompt is too long" The conversation is longer than the model's window. Start a new chat, let the tool compact it, or pick a model with a larger window.
insufficient_quota Your balance cannot pay for the request. Top up or change plan; the request is not retried by itself.

Questions

Does AutoGen work with Shannon?

Yes, through OpenAIChatCompletionClient with base_url="https://api.shannon-ai.com/v1" and a model_info block.

Do AutoGen tools work?

Yes; with function_calling: True the agent receives native tool calls, which we tested.

Choose your language

All languages are equal. Pick the one you want to browse in.

Europe

Middle East & North Africa

South Asia

Southeast Asia

East Asia

Central Asia & Caucasus

Africa

Oceania

Constructed & Classical