Open Agent Sdk Python banner
codeany-ai codeany-ai

Open Agent Sdk Python

Development community

Description

Open-source Agent SDK for Python. Runs the full agent loop in-process — no CLI required.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Open Agent SDK (Python)

[![PyPI version](https://img.shields.io/pypi/v/open-agent-sdk)](https://pypi.org/project/open-agent-sdk/) [![Python](https://img.shields.io/badge/python-%3E%3D3.10-brightgreen)](https://python.org) [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)

Open-source Agent SDK that runs the full agent loop **in-process** — no subprocess or CLI required. Deploy anywhere: cloud, serverless, Docker, CI/CD.

Also available in **TypeScript**: [open-agent-sdk-typescript](https://github.com/codeany-ai/open-agent-sdk-typescript) · **Go**: [open-agent-sdk-go](https://github.com/codeany-ai/open-agent-sdk-go)

Features

  • Multi-Provider — Anthropic + OpenAI-compatible APIs (DeepSeek, Qwen, vLLM, Ollama) via unified provider abstraction
  • Agent Loop — Streaming agentic loop with tool execution, multi-turn conversations, and cost tracking
  • 35 Built-in Tools — Bash, Read, Write, Edit, Glob, Grep, WebFetch, WebSearch, Agent (subagents), Skill, and more
  • Skill System — Reusable prompt templates with 5 bundled skills (commit, review, debug, simplify, test)
  • MCP Support — Connect to MCP servers via stdio, HTTP, and SSE transports
  • Permission System — Configurable tool approval with allow/deny rules and custom callbacks
  • Hook System — 20 lifecycle events for agent behavior interception
  • Session Persistence — Save/load/fork conversation sessions
  • Custom Tools — Define tools with Pydantic models or raw JSON schemas
  • Extended Thinking — Claude thinking budget configuration
  • Cost Tracking — Per-model token usage with accurate pricing (Anthropic + OpenAI + DeepSeek + Qwen)

Get started

pip install open-agent-sdk

Set your API key:

export CODEANY_API_KEY=your-api-key

Third-party providers (e.g. OpenRouter) are supported via `CODEANY_BASE_URL`:

export CODEANY_BASE_URL=https://openrouter.ai/api
export CODEANY_API_KEY=sk-or-...
export CODEANY_MODEL=anthro