{"id":36665149,"url":"https://github.com/ultracontext/ultracontext-python","last_synced_at":"2026-01-14T08:31:16.314Z","repository":{"id":332063474,"uuid":"1129516236","full_name":"ultracontext/ultracontext-python","owner":"ultracontext","description":"The context API for AI agents","archived":false,"fork":false,"pushed_at":"2026-01-09T19:22:42.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T17:53:46.308Z","etag":null,"topics":["agents","ai","ai-agents","api","context-api","context-engineering","context-management","context-window","llm","llm-ops","python","sdk","ultracontext","versioning"],"latest_commit_sha":null,"homepage":"https://ultracontext.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ultracontext.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-07T07:44:00.000Z","updated_at":"2026-01-09T19:22:46.000Z","dependencies_parsed_at":"2026-01-12T18:00:08.616Z","dependency_job_id":null,"html_url":"https://github.com/ultracontext/ultracontext-python","commit_stats":null,"previous_names":["ultracontext/ultracontext-python"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ultracontext/ultracontext-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultracontext%2Fultracontext-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultracontext%2Fultracontext-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultracontext%2Fultracontext-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultracontext%2Fultracontext-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ultracontext","download_url":"https://codeload.github.com/ultracontext/ultracontext-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultracontext%2Fultracontext-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:16:59.381Z","status":"ssl_error","status_checked_at":"2026-01-14T08:13:45.490Z","response_time":107,"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":["agents","ai","ai-agents","api","context-api","context-engineering","context-management","context-window","llm","llm-ops","python","sdk","ultracontext","versioning"],"created_at":"2026-01-12T10:32:54.625Z","updated_at":"2026-01-14T08:31:16.306Z","avatar_url":"https://github.com/ultracontext.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://ultracontext.ai\"\u003e\n    \u003cimg src=\"https://ultracontext.ai/og-python.png\" alt=\"UltraContext\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eThe context API for AI agents.\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://ultracontext.ai/docs/quickstart/python\"\u003eQuickstart\u003c/a\u003e\n  ·\n  \u003ca href=\"https://ultracontext.ai/docs\"\u003eDocumentation\u003c/a\u003e\n  ·\n  \u003ca href=\"https://ultracontext.ai/docs/api-reference/introduction\"\u003eAPI Reference\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pypi.org/project/ultracontext/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/ultracontext\" alt=\"PyPI version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ultracontext/ultracontext-python/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/l/ultracontext?v=1\" alt=\"license\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e📚 Guides\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://ultracontext.ai/docs/guides/store-retrieve-contexts\"\u003eStore \u0026 Retrieve\u003c/a\u003e\n  ·\n  \u003ca href=\"https://ultracontext.ai/docs/guides/edit-contexts\"\u003eEdit Contexts\u003c/a\u003e\n  ·\n  \u003ca href=\"https://ultracontext.ai/docs/guides/fork-clone-contexts\"\u003eFork \u0026 Clone\u003c/a\u003e\n  ·\n  \u003ca href=\"https://ultracontext.ai/docs/guides/view-context-history\"\u003eView History\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\nUltraContext is the simplest way to control what your agents see.\n\nReplace messages, compact/offload context, replay decisions and roll back mistakes — with a single API call. Versioned context out of the box. Full history. Zero complexity.\n\n\u003cbr /\u003e\n\n## Why Context Matters\n\nContext is the RAM of LLMs — everything they can see.\n\nAs context grows, model attention spreads thin — this is known as **context rot**. We should aim to provide the smallest set of high-signal tokens that get the job done.\n\nRight now, we're reinventing the wheel for every car we build. Instead of tackling interesting problems, we catch ourselves spending most of our time gluing context together.\n\n**It's time to simplify.**\n\n\u003cbr /\u003e\n\n## Why UltraContext\n\n- **Simple API** — Five methods. That's it.\n- **Automatic versioning** — Updates/deletes create versions. Nothing is lost.\n- **Time-travel** — Jump to any point by version, index, or timestamp.\n- **Schema-free** — Store any JSON. Own your data structure.\n- **Framework-agnostic** — Works with any LLM framework.\n- **Fast** — Globally distributed. Low latency.\n\nJust plug \u0026 play.\n\n\u003cbr /\u003e\n\n## Install\n\n```bash\npip install ultracontext\n```\n\n\u003cbr /\u003e\n\n## 🚀 Quick Start\n\n```python\nfrom ultracontext import UltraContext\n\nuc = UltraContext(api_key=\"uc_live_...\")\n\nctx = uc.create()\nuc.append(ctx[\"id\"], {\"role\": \"user\", \"content\": \"Hello!\"})\n\n# use with any LLM framework\nresponse = generate_text(model=model, messages=uc.get(ctx[\"id\"])[\"data\"])\n```\n\n### Async\n\n```python\nimport asyncio\nfrom ultracontext import AsyncUltraContext\n\nasync def main():\n    uc = AsyncUltraContext(api_key=\"uc_live_...\")\n    ctx = await uc.create()\n    await uc.append(ctx[\"id\"], {\"role\": \"user\", \"content\": \"Hello!\"})\n\nasyncio.run(main())\n```\n\nGet an API key from the [UltraContext Dashboard](https://ultracontext.ai/dashboard).\n\n\u003cbr /\u003e\n\n## API\n\n```python\n# create - new context or fork\nctx = uc.create()\nctx = uc.create(from_=\"ctx_abc123\")\nctx = uc.create(from_=\"ctx_abc123\", version=2)\nctx = uc.create(from_=\"ctx_abc123\", at=5)\nctx = uc.create(metadata={\"user_id\": \"123\"})\n\n# get - retrieve context (or list all)\nctxs = uc.get()\nctxs = uc.get(limit=10)\ndata = uc.get(\"ctx_abc123\")\ndata = uc.get(\"ctx_abc123\", version=2)\ndata = uc.get(\"ctx_abc123\", at=5)\ndata = uc.get(\"ctx_abc123\", history=True)\n\n# append - add messages (schema-free)\nuc.append(ctx[\"id\"], {\"role\": \"user\", \"content\": \"Hi\"})\nuc.append(ctx[\"id\"], [{\"role\": \"user\", \"content\": \"Hi\"}, {\"foo\": \"bar\"}])\n\n# update - modify by id or index (auto-versions)\nuc.update(ctx[\"id\"], id=\"msg_xyz\", content=\"Fixed!\")\nuc.update(ctx[\"id\"], index=-1, content=\"Fix last message\")\nuc.update(ctx[\"id\"], id=\"msg_xyz\", content=\"Fixed!\", metadata={\"reason\": \"typo\"})\n\n# delete - remove by id or index (auto-versions)\nuc.delete(ctx[\"id\"], \"msg_xyz\")\nuc.delete(ctx[\"id\"], -1)\nuc.delete(ctx[\"id\"], [\"msg_a\", \"msg_b\", -1], metadata={\"reason\": \"cleanup\"})\n```\n\n\u003cbr /\u003e\n\n## Documentation\n\n- [Quickstart](https://ultracontext.ai/docs/quickstart/python) — Get running in 2 minutes\n- [Guides](https://ultracontext.ai/docs/guides/store-retrieve-contexts) — Practical patterns for common use cases\n- [API Reference](https://ultracontext.ai/docs/api-reference/introduction) — Full endpoint documentation\n\n\u003cbr /\u003e\n\n## License\n\nMIT\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://ultracontext.ai\"\u003eWebsite\u003c/a\u003e\n  ·\n  \u003ca href=\"https://ultracontext.ai/docs\"\u003eDocs\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/ultracontext/ultracontext-python/issues\"\u003eIssues\u003c/a\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultracontext%2Fultracontext-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fultracontext%2Fultracontext-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultracontext%2Fultracontext-python/lists"}