Skip to main content

Autonomous software engineering agent built on the Viable System Model

Project description

cogos

CogOS — an autonomous software engineering agent built on the Viable System Model.

Prerequisites

  • Python 3.12+
  • uv package manager
  • AWS credentials with Bedrock access (for LLM calls)

CogOS uses Claude on AWS Bedrock. You need an AWS account with Bedrock model access enabled for us.anthropic.claude-sonnet-4-5-* in your region (default: us-east-1). Configure credentials via aws configure or AWS SSO.

Getting Started

# 1. Install
uv sync --all-extras

# 2. Boot the default image
uv run cogos local cogos image boot cogos --clean

# 3. Start the interactive shell
uv run cogos local shell

Inside the shell, start a conversation:

cogos:/$ llm -i
llm> hello, what can you do?

That's it. The shell calls Bedrock directly — no executor loop, no extra services.

What just happened

  • cogos local uses a JSON-backed local store (.local/cogos/cogos_data.json) instead of AWS RDS/Lambda. No cloud infrastructure needed beyond Bedrock.
  • image boot cogos --clean loaded the default cogent image from images/cogos/ — capabilities, processes, handlers, and files.
  • shell opened an interactive session. llm -i starts a multi-turn conversation with your cogent via Bedrock.

Other shell commands: help, llm -v <prompt> (verbose with tool traces), files ls, caps ls, procs ls.

Running the Executor Loop

The shell is good for interactive use. For event-driven execution (channel messages triggering processes), run the local executor:

# Terminal 1: start the executor (polls every 2s, replaces Lambda dispatch)
uv run cogos local cogos run-local

# Terminal 2: send a message to trigger a process
uv run cogos local cogos channel send io:discord:dm \
  --payload '{"content":"hello","author":"tester","author_id":"1","channel_id":"2","message_type":"discord:dm","is_dm":true,"is_mention":false,"attachments":[],"embeds":[]}'

# Or run a single tick
uv run cogos local cogos run-local --once

# Inspect runs
uv run cogos local cogos run list --limit 5

Dashboard

The dashboard gives you a web UI for processes, files, capabilities, handlers, runs, and events.

# Install frontend dependencies (one-time)
cd dashboard/frontend && npm ci && cd ../..

# Start both backend and frontend
uv run cogos local cogos dashboard start

The URL will be printed (usually http://localhost:29489).

uv run cogos local cogos dashboard reload   # stop + start
uv run cogos local cogos dashboard stop     # stop both

Logs: /tmp/cogos-backend.log, /tmp/cogos-frontend.log

To run backend and frontend separately:

# Terminal 1
USE_LOCAL_DB=1 uv run uvicorn dashboard.app:app --host 0.0.0.0 --port 8100

# Terminal 2
cd dashboard/frontend && npm run dev

Deploying to AWS

Local mode is good for development. To deploy a cogent with persistent infrastructure (RDS, Lambda, ECS, Discord bridge), see the deployment guide.

The short version:

polis create                              # shared infrastructure (one-time)
cogos <name> cogtainer create             # per-cogent infrastructure
cogos <name> cogos image boot cogos       # load application image
cogos <name> cogos io discord start       # start Discord bridge

This requires AWS Organizations, a domain for DNS, and secrets configured in AWS Secrets Manager. See AGENTS.md for the full operational reference.

Troubleshooting

LLM calls fail: Ensure AWS credentials are configured and Bedrock model access is enabled for Claude Sonnet 4.5 in us-east-1. Check with aws bedrock list-foundation-models --region us-east-1 | grep claude.

image boot shows no capabilities: Make sure you used --clean to wipe stale state.

Executor runs but nothing happens: Check that handlers exist with uv run cogos local cogos handler list. If empty, re-run image boot cogos --clean.

Dashboard frontend fails to start: Run cd dashboard/frontend && npm ci first.

References

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

cogos-0.1.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

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

cogos-0.1.0-py3-none-any.whl (438.4 kB view details)

Uploaded Python 3

File details

Details for the file cogos-0.1.0.tar.gz.

File metadata

  • Download URL: cogos-0.1.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cogos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d6461d0f8eb1699dae844e7d55e566b7e74d07675f0660a1987ad5d0f849035a
MD5 d32757bcf9ebbbcb235a6b491ed8a90f
BLAKE2b-256 9a866dfe8ee423ce232f351a9967481859f1ba912104f1f552db947f93c88f3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cogos-0.1.0.tar.gz:

Publisher: pypi-publish.yml on Metta-AI/cogos

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

File details

Details for the file cogos-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for cogos-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6450d2554b72f65b5058227eedc898ab5f70d0f7cd3235e449f081e56de73ef6
MD5 71caa51e9513105c0746ff4857f34e41
BLAKE2b-256 30dd022101a279a514e666b47b66a9741b14acef9b7eaa68f08f5634e48043c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for cogos-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on Metta-AI/cogos

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