Skip to main content

Bog Agents - batteries-included agent harness for building AI agents. Supports any major provider (Anthropic, OpenAI, AWS Bedrock, Google, etc.) and local models via Ollama. Built on LangGraph.

Project description

Bog Agents

The Python SDK underneath bog-agents-cli and bog-agents-daemon. One create_agent() call gets you a compiled LangGraph agent with file tools, a shell, git, sub-agents, plan mode, auto-quality checks, and 80-some composable middleware. Pluggable backends. Any tool-calling LLM.

PyPI License Downloads


Install

pip install bog-agents
# or
uv add bog-agents

Python 3.11 or better. Bring your own provider package — Anthropic, OpenAI, AWS, Google, local Ollama, doesn't matter. Pick one or pick all of them.


First run

from bog_agents import create_agent

agent = create_agent()  # default: anthropic:claude-sonnet-4-6

result = agent.invoke(
    {"messages": [{"role": "user", "content": "Hello!"}]},
    config={"configurable": {"thread_id": "my-thread"}},
)

Pick whatever model you've got the keys for:

agent = create_agent(model="openai:gpt-5.4")
agent = create_agent(model="bedrock_converse:us.anthropic.claude-sonnet-4-6")
agent = create_agent(model="google_genai:gemini-2.5-pro")
agent = create_agent(model="ollama:gpt-oss:20b")  # local, free

What it does

Builds the agent. create_agent() returns a compiled LangGraph graph wired with whatever middleware stack you ask for. Default is sensible. Power users override every piece.

Talks to anything. Anthropic, OpenAI, AWS Bedrock, Google AI / Vertex AI, DeepSeek, Mistral, Groq, NVIDIA, Ollama, Cohere, xAI, Perplexity, Fireworks, OpenRouter, Together, HuggingFace — anything LangChain knows about, this handles.

Reads, writes, edits, runs, commits. Filesystem tools, shell tools, git tools — all pluggable. Local backend by default; swap in a remote sandbox (Modal, Daytona, Runloop, LangSmith) when you want isolation.

Sub-agents. Spawn child agents to parallelize work that doesn't need to share state.

Plan mode and checkpoints. Read-only plan mode for scouting; git-based snapshots before mutations so you can roll back without thinking about it.

Production hooks. bog_agents.serve.AgentServer exposes a REST + SSE API. bog-agents-daemon schedules ambient runs on cron, file-change, webhook, and git-push triggers. Built for the long haul, not just a demo.


A loaded example

When you want the whole posse:

from bog_agents import create_agent

agent = create_agent(
    model="anthropic:claude-sonnet-4-6",
    enable_git_tools=True,
    enable_repo_map=True,
    enable_checkpointing=True,
    enable_cost_tracking=True,
    enable_plan_mode=True,
    auto_lint=True,
    working_dir="/path/to/project",
)

result = await agent.ainvoke(
    {"messages": [{"role": "user", "content": "Fix the failing tests"}]},
    config={"configurable": {"thread_id": "my-session"}},
)

Middleware

Eighty-some pieces in the stack. Mix what you need; leave the rest in the wagon.

Middleware What it does
FilesystemMiddleware read / write / edit / multi-edit / glob / grep
GitToolsMiddleware status, diff, log, commit, add, branch, stash, blame, show
RepoMapMiddleware symbol-extracted code map (Python, JS, TS, Rust, Go, Java)
CheckpointingMiddleware git-based snapshot before mutations + diff/undo
CostTrackerMiddleware tokens, cost, budgets, effort levels
PlanModeMiddleware read-only mode that blocks mutating tools
AutoQualityMiddleware auto-lint / auto-test after edits with project detection
ArchitectMiddleware dual-model architect ↔ reviewer cross-talk
ParallelAgentsMiddleware concurrent sub-agent execution
LifecycleHooksMiddleware 15 event types for external tool integration
ContextPackingMiddleware structured context compression
SummarizationMiddleware auto-summarize when the context window fills
MemoryMiddleware persistent AGENTS.md memory across sessions
SkillsMiddleware custom skill / instruction loading
SafeToolsConfig per-tool auto-approval rules

Run as an HTTP server

For when something else needs to drive.

pip install 'bog-agents[serve]'
from bog_agents import create_agent
from bog_agents.serve import AgentServer

agent = create_agent()
server = AgentServer(agent)
server.run()  # http://127.0.0.1:8420

Endpoints out of the box:

GET  /health
GET  /info
GET  /openapi.json     <-- hand-rolled OpenAPI 3.0 schema; Swagger UI works
POST /invoke
POST /stream            <-- Server-Sent Events
POST /threads
GET  /threads
POST /threads/{id}/messages
GET  /threads/{id}/history

Companion packages

Package What it's for
bog-agents-cli TUI and non-interactive CLI. Drives an agent from your terminal.
bog-agents-daemon Ambient agent scheduler. Cron, file-watch, webhooks, git push.

All three release together with the same version number.


Security model

LocalShellBackend.execute() runs commands on the host with shell=True. No sandbox. No process isolation. That's by design — when you're in your own checkout you don't want a wall in the way. When you're running someone else's input, set up a remote sandbox backend (ModalBackend, DaytonaBackend, RunloopBackend, LangSmithBackend) and route the same agent through it.

The shell decodes child output as UTF-8 with errors='replace', so output containing checkmarks, ANSI escapes, or box-drawing characters never trips the Windows cp1252 reader. Recurring fix across 0.7.3.

For Bedrock specifically, the SDK's credential probe falls back from an expired SSO session to static ~/.aws/credentials keys automatically — see [models.providers.bedrock] auth_mode in the CLI's config.toml, or set BOG_AGENTS_BEDROCK_AUTH_MODE. New in 0.7.4.


Resources


Contributing

Contributing Guide. Conventional Commits required (feat:, fix:, etc.). 150-char line length. ruff + ty clean. Full test suite green per package, no fork-of-fork lineage drift.


License

MIT.


Saddle up.

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

bog_agents-0.7.6.tar.gz (380.9 kB view details)

Uploaded Source

Built Distribution

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

bog_agents-0.7.6-py3-none-any.whl (463.2 kB view details)

Uploaded Python 3

File details

Details for the file bog_agents-0.7.6.tar.gz.

File metadata

  • Download URL: bog_agents-0.7.6.tar.gz
  • Upload date:
  • Size: 380.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for bog_agents-0.7.6.tar.gz
Algorithm Hash digest
SHA256 b719e444ce41af6352c26b2dd0b268501181d7e5825db806cccd47be668a19d4
MD5 12cded736d9001a5a886d54ff960ffa2
BLAKE2b-256 da7c5def653ae5887343d3538b23dac287ccf09bcf40991e5e17044a06111b8c

See more details on using hashes here.

File details

Details for the file bog_agents-0.7.6-py3-none-any.whl.

File metadata

  • Download URL: bog_agents-0.7.6-py3-none-any.whl
  • Upload date:
  • Size: 463.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for bog_agents-0.7.6-py3-none-any.whl
Algorithm Hash digest
SHA256 49514156256b0432e0607930519bf85a03a6762601c939185f125a06dd9524ea
MD5 503e68bd6dc1fa6b59d09d9b6bd235fa
BLAKE2b-256 8816d3498549f131400e891bc0626d728020a43c548482e4d8692490f7436b2a

See more details on using hashes here.

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