OpenAI Agents SDK with an uncensored model
To run OpenAI Agents SDK with an uncensored model, pass an AsyncOpenAI client with a custom base URL to OpenAIChatCompletionsModel and pick an abliterated model id.
import asyncio, os
from agents import (Agent, AsyncOpenAI, OpenAIChatCompletionsModel,
Runner, function_tool, set_tracing_disabled)
set_tracing_disabled(disabled=True)
client = AsyncOpenAI(base_url="https://api.silkcompute.com",
api_key=os.environ["SILK_API_KEY"])
@function_tool
def read_note(name: str) -> str:
"""Read one of my notes from ./notes."""
return open(f"notes/{name}.md").read()
agent = Agent(
name="Assistant",
instructions="Work only on the user's own files and accounts.",
model=OpenAIChatCompletionsModel(model="kimi-k3.1-pro-uncensored",
openai_client=client),
tools=[read_note],
)
result = asyncio.run(Runner.run(agent, "Turn my todo note into a plan."))
print(result.final_output)- OpenAI format
- OpenAIChatCompletionsModel
- Anthropic format
- Through an adapter
- Tool calling
- @function_tool
- Streaming
- Runner.run_streamed
- Browser use
- ComputerTool is for OpenAI models
- Memory
- Sessions
Labels link to OpenAI Agents SDK's own docs, read November 18, 2026. Compare all 11
Point the agent only at systems, files and accounts you own or are allowed to test.
Deploy it
3 steps, with Kimi K3.1 Pro.
- 01
Install the SDK. Python 3.10 or newer.
Terminalpip install openai-agents export SILK_API_KEY=... - 02
Point a client at the base URL. The SDK docs advise OpenAIChatCompletionsModel for other providers, and tracing off without an OpenAI key.
See agent.py above - 03
Run it. The run ends when the model answers without calling a tool.
Terminalpython agent.py
Which model
Kimi K3.1 Pro
Long runs, image and video input
- Id
kimi-k3.1-pro-uncensored- Per 1M in / out
- $3.50 / $8.00
DeepSeek V4.1 Flash 1017
Value, image input
- Id
deepseek-v4.1-flash-1017-uncensored- Per 1M in / out
- $0.24 / $0.90
The config uses the Silk Compute base URL, which serves both models with a 1,048,576-token context.