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 init my-cogent && cd my-cogent
uv add cogos

# 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.1.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.1-py3-none-any.whl (586.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cogos-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 37f8584dfebdd6740b35410542fdc18eb4072012f3016c6c3612896f91529bb7
MD5 a9f83a81d5d676d0e004c2f67c4df527
BLAKE2b-256 ad790ae06533c9523151500b043b49d48093eed893713f0109e38673a6f35d96

See more details on using hashes here.

Provenance

The following attestation bundles were made for cogos-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: cogos-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 586.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3fcbe2a7981ede1f72f72e3a037c69bd169d8d32ca0ebcf2aee88d36abc5c08
MD5 ad1ba6aabc0924fab1de39bd30dbe48a
BLAKE2b-256 9680178ed07c0a890465bf940d409f06ed4e5eb134191cd59205302de999b02e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cogos-0.1.1-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