{"id":33853737,"url":"https://github.com/memodb-io/acontext","last_synced_at":"2026-04-08T13:01:03.687Z","repository":{"id":324264362,"uuid":"1020834440","full_name":"memodb-io/Acontext","owner":"memodb-io","description":"Agent Skills as a Memory Layer","archived":false,"fork":false,"pushed_at":"2026-04-01T09:22:12.000Z","size":29863,"stargazers_count":3262,"open_issues_count":18,"forks_count":305,"subscribers_count":27,"default_branch":"main","last_synced_at":"2026-04-02T09:30:19.938Z","etag":null,"topics":["agent","agent-development-kit","agent-observability","ai-agent","anthropic","context-data-platform","context-engineering","data-platform","llm","llm-observability","llmops","memory","openai","self-evolving","self-learning"],"latest_commit_sha":null,"homepage":"https://acontext.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memodb-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-07-16T13:15:48.000Z","updated_at":"2026-04-02T08:01:43.000Z","dependencies_parsed_at":"2026-03-05T12:02:43.832Z","dependency_job_id":null,"html_url":"https://github.com/memodb-io/Acontext","commit_stats":null,"previous_names":["memodb-io/acontext"],"tags_count":296,"template":false,"template_full_name":null,"purl":"pkg:github/memodb-io/Acontext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memodb-io%2FAcontext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memodb-io%2FAcontext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memodb-io%2FAcontext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memodb-io%2FAcontext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memodb-io","download_url":"https://codeload.github.com/memodb-io/Acontext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memodb-io%2FAcontext/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31556239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agent-development-kit","agent-observability","ai-agent","anthropic","context-data-platform","context-engineering","data-platform","llm","llm-observability","llmops","memory","openai","self-evolving","self-learning"],"created_at":"2025-12-08T22:00:36.876Z","updated_at":"2026-04-08T13:01:03.661Z","avatar_url":"https://github.com/memodb-io.png","language":"TypeScript","funding_links":[],"categories":["NLP"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://discord.acontext.io\"\u003e\n      \u003cimg alt=\"Acontext - Agent Skills as a Memory Layer\" src=\"./assets/Acontext-header-banner.png\"\u003e\n  \u003c/a\u003e\n \t\u003cp align=\"center\"\u003e\n \t  \t\u003ca href=\"https://acontext.io\"\u003e🌐 Website\u003c/a\u003e\n      |\n \t  \t\u003ca href=\"https://docs.acontext.io\"\u003e📚 Document\u003c/a\u003e\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/acontext/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/acontext.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@acontext/acontext\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@acontext/acontext.svg?logo=npm\u0026logoColor=fff\u0026style=flat\u0026labelColor=2C2C2C\u0026color=28CF8D\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/memodb-io/acontext/actions/workflows/core-test.yaml\"\u003e\u003cimg src=\"https://github.com/memodb-io/acontext/actions/workflows/core-test.yaml/badge.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/memodb-io/acontext/actions/workflows/api-test.yaml\"\u003e\u003cimg src=\"https://github.com/memodb-io/acontext/actions/workflows/api-test.yaml/badge.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/memodb-io/acontext/actions/workflows/cli-test.yaml\"\u003e\u003cimg src=\"https://github.com/memodb-io/acontext/actions/workflows/cli-test.yaml/badge.svg\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003cp align=\"center\"\u003e\n \t  \t\u003ca href=\"https://x.com/acontext_io\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/acontext_io?style=social\" alt=\"Twitter Follow\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://discord.acontext.io\"\u003e\u003cimg src=\"https://img.shields.io/badge/dynamic/json?label=Acontext\u0026style=flat\u0026query=approximate_member_count\u0026url=https%3A%2F%2Fdiscord.com%2Fapi%2Fv10%2Finvites%2FSG9xJcqVBu%3Fwith_counts%3Dtrue\u0026logo=discord\u0026logoColor=white\u0026suffix=+members\u0026color=36393f\u0026labelColor=5765F2\" alt=\"Acontext Discord\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\n\n\n## What is Acontext?\n\nAcontext is an open-source skill memory layer for AI agents. It **automatically** captures learnings from agent runs and stores them as **agent skill files** — files you can read, edit, and share across agents, LLMs, and frameworks.\n\nIf you want the agent you build to **learn from its mistakes** and **reuse what worked** — without opaque memory polluting your context — give Acontext a try.\n\n\n\n## Skill is All You Need\n\nAgent memory is getting increasingly complicated🤢 — hard to understand, hard to debug, and hard for users to inspect or correct. Acontext takes a different approach: if agent skills can represent every piece of knowledge an agent needs as simple files, so can the memory.\n\n- **Acontext builds memory in the agent skills format**, so everyone can see and understand what the memory actually contains.\n- **Skill is Memory, Memory is Skill**. Whether a skill comes from one you downloaded from Clawhub or one you created yourself, Acontext can follow it and evolve it over time.\n\n\n\n## The Philosophy of Acontext\n\n- **Plain file, any framework** — Skill memories are Markdown files. Use them with LangGraph, Claude, AI SDK, or anything that reads files. No embeddings, no API lock-in. Git, grep, and mount to the sandbox.\n- **You design the structure** — Attach more skills to define the schema, naming, and file layout of the memory. For example: one file per contact, one per project by uploading a working context skill.\n- **Progressive disclosure, not search** — The agent can use  `get_skill` and `get_skill_file` to fetch what it needs. Retrieval is by tool use and reasoning, not semantic top-k.\n- **Download as ZIP, reuse anywhere** — Export skill files as ZIP. Run locally, in another agent, or with another LLM. No vendor lock-in; no re-embedding or migration step.\n\n## How It Works\n\n### Store — How skills get memorized?\n\n```mermaid\nflowchart LR\n  A[Session messages] --\u003e C[Task complete/failed]\n  C --\u003e D[Distillation]\n  D --\u003e E[Skill Agent]\n  E --\u003e F[Update Skills]\n```\n\n- **Session messages** — Conversation (and optionally tool calls, artifacts) is the raw input. Tasks are extracted from the message stream automatically (or inferred from explicit outcome reporting).\n- **Task complete or failed** — When a task is marked done or failed (e.g. by agent report or automatic detection), that outcome is the trigger for learning.\n- **Distillation** — An LLM pass infers from the conversation and execution trace what worked, what failed, and user preferences.\n- **Skill Agent** — Decides where to store (existing skill or new) and writes according to your `SKILL.md` schema.\n- **Update Skills** — Skills are updated. You define the structure in `SKILL.md`; the system does extraction, routing, and writing.\n\n### Recall — How the agent uses skills on the next run\n\n```mermaid\nflowchart LR\n  E[Any Agent] --\u003e F[list_skills/get_skill]\n  F --\u003e G[Appear in context]\n```\n\nGive your agent **Skill Content Tools** (`get_skill`, `get_skill_file`). The agent decides what it needs, calls the tools, and gets the skill content. No embedding search — **progressive disclosure, agent in the loop**.\n\n\n\n# 🪜 Use It to Improve your Agent\n\nClaude Code: \n\n```text\nRead https://acontext.io/SKILL.md and follow the instructions to install and configure Acontext for Claude Code\n```\n\nOpenClaw:\n\n```text\nRead https://acontext.io/SKILL.md and follow the instructions to install and configure Acontext for OpenClaw\n```\n\n\n\n\n# 🚀 Step-by-step Quickstart\n\n### Connect to Acontext\n\n1. Go to [Acontext.io](https://acontext.io), claim your free credits.\n2. Go through a one-click onboarding to get your API Key (starts with `sk-ac`)\n\n\u003cdiv align=\"center\"\u003e\n    \u003cpicture\u003e\n      \u003cimg alt=\"Dashboard\" src=\"./assets/onboard.png\" width=\"80%\"\u003e\n    \u003c/picture\u003e\n\u003c/div\u003e\n\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003e💻 Self-host Acontext\u003c/summary\u003e\n\nWe have an `acontext-cli` to help you do a quick proof-of-concept. Download it first in your terminal:\n\n```bash\ncurl -fsSL https://install.acontext.io | sh\n```\n\nYou should have [docker](https://www.docker.com/get-started/) installed and an OpenAI API Key to start an Acontext backend on your computer:\n\n```bash\nmkdir acontext_server \u0026\u0026 cd acontext_server\nacontext server up\n```\n\n\u003e Make sure your LLM has the ability to [call tools](https://platform.openai.com/docs/guides/function-calling). By default, Acontext will use `gpt-4.1`.\n\n`acontext server up` will create/use `.env` and `config.yaml` for Acontext, and create a `db` folder to persist data.\n\n\n\nOnce it's done, you can access the following endpoints:\n\n- Acontext API Base URL: http://localhost:8029/api/v1\n- Acontext Dashboard: http://localhost:3000/\n\n\u003c/details\u003e\n\n\n\n### Install SDKs\n\nWe're maintaining Python [![pypi](https://img.shields.io/pypi/v/acontext.svg)](https://pypi.org/project/acontext/) and Typescript [![npm](https://img.shields.io/npm/v/@acontext/acontext.svg?logo=npm\u0026logoColor=fff\u0026style=flat\u0026labelColor=2C2C2C\u0026color=28CF8D)](https://www.npmjs.com/package/@acontext/acontext) SDKs. The snippets below are using Python.\n\n\u003e Click the doc link to see TS SDK Quickstart.\n\n```bash\npip install acontext\n```\n\n\n### Initialize Client\n\n```python\nimport os\nfrom acontext import AcontextClient\n\n# For cloud:\nclient = AcontextClient(\n    api_key=os.getenv(\"ACONTEXT_API_KEY\"),\n)\n\n# For self-hosted:\nclient = AcontextClient(\n    base_url=\"http://localhost:8029/api/v1\",\n    api_key=\"sk-ac-your-root-api-bearer-token\",\n)\n```\n\n\n\n### Skill Memory in Action\n\nCreate a learning space, attach a session, and let the agent learn — skills are written as Markdown files automatically.\n\n```python\nfrom acontext import AcontextClient\n\nclient = AcontextClient(api_key=\"sk-ac-...\")\n\n# Create a learning space and attach a session\nspace = client.learning_spaces.create()\nsession = client.sessions.create()\nclient.learning_spaces.learn(space.id, session_id=session.id)\n\n# Run your agent, store messages — when tasks complete, learning runs automatically\nclient.sessions.store_message(session.id, blob={\"role\": \"user\", \"content\": \"My name is Gus\"})\nclient.sessions.store_message(session.id, blob={\"role\": \"assistant\", \"content\": \"Hi Gus! How can I help you today?\"})\n# ... agent runs ...\n\n# List learned skills (Markdown files)\nclient.learning_spaces.wait_for_learning(space.id, session_id=session.id)\nskills = client.learning_spaces.list_skills(space.id)\n\n# Download all skill files to a local directory\nfor skill in skills:\n    client.skills.download(skill_id=skill.id, path=f\"./skills/{skill.name}\")\n```\n\n\u003e `wait_for_learning` is a blocking helper for demo purposes. In production, task extraction and learning run in the background automatically — your agent never waits.\n\n### More Features\n\n- **[Context Engineering](https://docs.acontext.io/engineering/editing)** — Compress context with summaries and edit strategies\n- **[Disk](https://docs.acontext.io/store/disk)** — Virtual, persistent filesystem for agents\n- **[Sandbox](https://docs.acontext.io/store/sandbox)** — Isolated code execution with bash, Python, and [mountable skills](https://docs.acontext.io/tool/bash_tools#mounting-skills-in-sandbox)\n- **[Agent Tools](https://docs.acontext.io/tool/whatis)** — Disk tools, sandbox tools, and skill tools for LLM function calling\n\n\n\n\n\n# 🧐 Use Acontext to Build Agents\n\nDownload end-to-end scripts with `acontext`:\n\n**Python**\n\n```bash\nacontext create my-proj --template-path \"python/openai-basic\"\n```\n\nMore examples on Python:\n\n- `python/openai-agent-basic`: openai agent sdk template\n- `python/openai-agent-artifacts`: agent can edit and download artifacts\n- `python/claude-agent-sdk`: claude agent sdk with `ClaudeAgentStorage`\n- `python/agno-basic`: agno framework template\n- `python/smolagents-basic`: smolagents (huggingface) template\n- `python/interactive-agent-skill`: interactive sandbox with mountable agent skills\n\n**Typescript**\n\n```bash\nacontext create my-proj --template-path \"typescript/openai-basic\"\n```\n\nMore examples on Typescript:\n- `typescript/vercel-ai-basic`: agent in @vercel/ai-sdk\n- `typescript/claude-agent-sdk`: claude agent sdk with `ClaudeAgentStorage`\n- `typescript/interactive-agent-skill`: interactive sandbox with mountable agent skills\n\n\n\n\u003e [!NOTE]\n\u003e\n\u003e Check our example repo for more templates: [Acontext-Examples](https://github.com/memodb-io/Acontext-Examples).\n\u003e\n\u003e We're cooking more full-stack Agent Applications! [Tell us what you want!](https://discord.acontext.io)\n\n\n\n\n\n# 🔍 Documentation\n\nTo learn more about skill memory and what Acontext can do, visit [our docs](https://docs.acontext.io/) or start with [What is Skill Memory?](https://docs.acontext.io/learn/quick)\n\n\n\n# ❤️ Stay Updated\n\nStar Acontext on GitHub to support us and receive instant notifications.\n\n![click_star](./assets/star_acontext.gif)\n\n\n\n# 🏗️ Architecture\n\n\u003cdetails\u003e\n\u003csummary\u003eclick to open\u003c/summary\u003e\n\n```mermaid\ngraph TB\n    subgraph \"Client Layer\"\n        PY[\"pip install acontext\"]\n        TS[\"npm i @acontext/acontext\"]\n    end\n    \n    subgraph \"Acontext Backend\"\n      subgraph \" \"\n          API[\"API\u003cbr/\u003elocalhost:8029\"]\n          CORE[\"Core\"]\n          API --\u003e|FastAPI \u0026 MQ| CORE\n      end\n      \n      subgraph \" \"\n          Infrastructure[\"Infrastructures\"]\n          PG[\"PostgreSQL\"]\n          S3[\"S3\"]\n          REDIS[\"Redis\"]\n          MQ[\"RabbitMQ\"]\n      end\n    end\n    \n    subgraph \"Dashboard\"\n        UI[\"Web Dashboard\u003cbr/\u003elocalhost:3000\"]\n    end\n    \n    PY --\u003e|RESTFUL API| API\n    TS --\u003e|RESTFUL API| API\n    UI --\u003e|RESTFUL API| API\n    API --\u003e Infrastructure\n    CORE --\u003e Infrastructure\n\n    Infrastructure --\u003e PG\n    Infrastructure --\u003e S3\n    Infrastructure --\u003e REDIS\n    Infrastructure --\u003e MQ\n    \n    \n    style PY fill:#3776ab,stroke:#fff,stroke-width:2px,color:#fff\n    style TS fill:#3178c6,stroke:#fff,stroke-width:2px,color:#fff\n    style API fill:#00add8,stroke:#fff,stroke-width:2px,color:#fff\n    style CORE fill:#ffd43b,stroke:#333,stroke-width:2px,color:#333\n    style UI fill:#000,stroke:#fff,stroke-width:2px,color:#fff\n    style PG fill:#336791,stroke:#fff,stroke-width:2px,color:#fff\n    style S3 fill:#ff9900,stroke:#fff,stroke-width:2px,color:#fff\n    style REDIS fill:#dc382d,stroke:#fff,stroke-width:2px,color:#fff\n    style MQ fill:#ff6600,stroke:#fff,stroke-width:2px,color:#fff\n```\n\n\u003c/details\u003e\n\n# 🤝 Stay Together\n\nJoin the community for support and discussions:\n\n-   [Discuss with Builders on Acontext Discord](https://discord.acontext.io) 👻 \n-  [Follow Acontext on X](https://x.com/acontext_io) 𝕏 \n\n\n\n# 🌟 Contributing\n\n- Check our [roadmap.md](./ROADMAP.md) first.\n- Read [contributing.md](./CONTRIBUTING.md)\n\n\n\n# 🥇 Badges\n\n![Made with Acontext](./assets/badge-made-with-acontext.svg) ![Made with Acontext (dark)](./assets/badge-made-with-acontext-dark.svg)\n\n```md\n[![Made with Acontext](https://assets.memodb.io/Acontext/badge-made-with-acontext.svg)](https://acontext.io)\n\n[![Made with Acontext](https://assets.memodb.io/Acontext/badge-made-with-acontext-dark.svg)](https://acontext.io)\n```\n\n\n\n\n\n# 📑 LICENSE\n\nThis project is currently licensed under [Apache License 2.0](LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemodb-io%2Facontext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemodb-io%2Facontext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemodb-io%2Facontext/lists"}