Skip to main content

Workspace-isolated Python framework for building tool-using LLM agents.

Project description

AgentKit

中文版本

AgentKit is a general-purpose framework for tool-using LLM agents. It provides workspace isolation, a unified LLM abstraction, a tool-execution loop, and both CLI and Python SDK entry points.

Current Capabilities

  • Strong workspace isolation: all agent-visible file access goes through WorkspaceFS
  • Unified LLM abstraction: ConversationItem / ConversationState / UnifiedLLMRequest / UnifiedLLMResponse
  • Provider support (sync, non-streaming, text)
    • OpenAI (responses / chat_completions)
    • Anthropic (messages)
    • Gemini (generateContent)
    • Qwen (OpenAI-compatible chat_completions)
    • vLLM (OpenAI-compatible chat_completions)
  • Registry-based tool system with built-in tools under src/agentkit/tools/library/ and custom tool loading from project file/directory entries
  • Agent loop that coordinates model reasoning and tool execution under step/time budgets
  • Run logs written to workspace/logs/run_<run_id>.jsonl

Status

  • The repository includes unit tests for the agent loop, CLI, tool system, runlog, and the OpenAI / Anthropic / Gemini / Qwen / vLLM provider adapters
  • There is no smoke-test coverage against live upstream APIs yet, so a final end-to-end validation against the target model is still recommended before production use

Documentation

Full documentation lives under docs/agentkit/. The published site is GitHub Pages and deploys automatically from pushes to main.

Install From Source

uv sync
uv run agentkit --help

Install From PyPI

pip install base-agentkit
agentkit --help

The import path and CLI command stay the same after installation:

from agentkit import create_agent

Example Configuration

vLLM

workspace:
  root: "./vllm_workspace"

provider:
  kind: "vllm"
  model: "glm-5"
  openai_api_variant: "chat_completions"
  conversation_mode: "auto"
  base_url: "http://localhost:8000/v1"
  api_key: "empty"
  temperature: 0.8
  timeout_s: 600
  retries: 2
  enable_thinking: true

agent:
  system_prompt: "You are a helpful agent. Use tools when needed."
  budget:
    max_steps: 200
    time_budget_s: 1800
    max_input_chars: 180000

tools:
  entries:
    - "./tools"
  allowed:
    - "view"
    - "create_file"
    - "str_replace"
    - "word_count"

runlog:
  enabled: true
  redact: true
  max_text_chars: 20000

Run From The CLI

export OPENAI_API_KEY="your-key"
uv run agentkit --config path/to/config.yaml run --task "List the files in the current workspace"

Python SDK

from agentkit import create_agent

agent = create_agent("path/to/config.yaml")
report = agent.run("Create notes/todo.txt in the workspace and write today's plan")
print(report.final_output)

Project Layout

The core implementation lives under src/agentkit/:

  • config/: configuration schema and loader
  • workspace/: strict filesystem isolation and workspace layout
  • llm/: unified abstractions, provider base/factory, and adapters
  • tools/: tool abstractions, registry, and autoloading
  • agent/: budgets, reports, runtime, and the agent loop
  • runlog/: structured events, event sinks, and JSONL runlogs
  • cli/: command-line entry point

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

base_agentkit-0.1.2.tar.gz (52.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

base_agentkit-0.1.2-py3-none-any.whl (76.3 kB view details)

Uploaded Python 3

File details

Details for the file base_agentkit-0.1.2.tar.gz.

File metadata

  • Download URL: base_agentkit-0.1.2.tar.gz
  • Upload date:
  • Size: 52.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for base_agentkit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 31bb951f8734e73e7fd3538a9910103331051a53b2f074bccc931d8b118d44ef
MD5 46bb1232c89f42f7b25d97c78541718c
BLAKE2b-256 48d51914767a4fe81102869b090afc90291d69eacc1838c9b7735719f3d2bf61

See more details on using hashes here.

Provenance

The following attestation bundles were made for base_agentkit-0.1.2.tar.gz:

Publisher: publish.yml on Inkjourney/agentkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file base_agentkit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: base_agentkit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 76.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for base_agentkit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 68b5ad87311a75cae73daba3e7ccd01a38920f4368af6d7352a6a80f91781a4a
MD5 635bd6c17df90ba8e35032ced9eb75b3
BLAKE2b-256 d31a150ef4611e480c2a5325b43e30c2382c7d1d077debd4f77c8e360fb3a7f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for base_agentkit-0.1.2-py3-none-any.whl:

Publisher: publish.yml on Inkjourney/agentkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page