{"id":48406539,"url":"https://github.com/omnidotdev/agent-core","last_synced_at":"2026-04-06T03:37:21.240Z","repository":{"id":339221747,"uuid":"1156012615","full_name":"omnidotdev/agent-core","owner":"omnidotdev","description":"🤖 Reusable AI agent library for Omni","archived":false,"fork":false,"pushed_at":"2026-03-22T06:40:40.000Z","size":205,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-06T03:37:18.605Z","etag":null,"topics":["agent","ai","library","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/omnidotdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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},"funding":{"github":["omnidotdev"],"custom":["https://omni.dev"]}},"created_at":"2026-02-12T06:44:42.000Z","updated_at":"2026-03-22T06:40:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/omnidotdev/agent-core","commit_stats":null,"previous_names":["omnidotdev/agent-core"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/omnidotdev/agent-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnidotdev%2Fagent-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnidotdev%2Fagent-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnidotdev%2Fagent-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnidotdev%2Fagent-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omnidotdev","download_url":"https://codeload.github.com/omnidotdev/agent-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnidotdev%2Fagent-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31458838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","ai","library","rust"],"created_at":"2026-04-06T03:37:17.856Z","updated_at":"2026-04-06T03:37:21.234Z","avatar_url":"https://github.com/omnidotdev.png","language":"Rust","funding_links":["https://github.com/sponsors/omnidotdev","https://omni.dev"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e🤖 Agent Core\u003c/h1\u003e\n\n[Website](https://omni.dev) | [Docs](https://docs.omni.dev) | [Feedback](https://backfeed.omni.dev/workspaces/omni) | [Discord](https://discord.gg/omnidotdev) | [X](https://x.com/omnidotdev)\n\n\u003c/div\u003e\n\n**Agent Core** is a reusable Rust library for building AI agents in the [Omni](https://omni.dev) ecosystem. It provides provider-agnostic LLM integration, conversation management, a permission system, and plan file management.\n\n## Features\n\n- **LLM Provider Abstraction** — BYOM (Bring Your Own Model) trait with streaming completions, supporting Anthropic, OpenAI, and a unified multi-provider backend\n- **Conversation Management** — Multi-turn conversation state with serialization and persistence\n- **Permission System** — Configurable ask/allow/deny presets, session caching, and TUI dialog integration for agent tool use\n- **Plan Management** — Plan file storage for plan mode with project-local and global directories\n- **Core Types** — Messages, roles, content blocks, tool definitions, streaming events, and usage tracking\n\n## Installation\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dependencies]\nagent-core = { git = \"https://github.com/omnidotdev/agent-core\" }\n```\n\n## Usage\n\n### LLM Provider\n\nImplement the `LlmProvider` trait to add support for any LLM backend:\n\n```rust\nuse agent_core::provider::{CompletionRequest, CompletionStream, LlmProvider};\n\nstruct MyProvider;\n\n#[async_trait::async_trait]\nimpl LlmProvider for MyProvider {\n    fn name(\u0026self) -\u003e \u0026'static str {\n        \"my-provider\"\n    }\n\n    async fn stream(\n        \u0026self,\n        request: CompletionRequest,\n    ) -\u003e agent_core::error::Result\u003cCompletionStream\u003e {\n        // Stream completion events from your LLM\n        todo!()\n    }\n}\n```\n\n### Built-in Providers\n\n```rust\nuse agent_core::providers::{AnthropicProvider, OpenAiProvider, UnifiedProvider};\n```\n\n### Conversation\n\n```rust\nuse agent_core::conversation::Conversation;\n\nlet mut conv = Conversation::with_system(\"You are a helpful assistant.\");\nconv.add_user_message(\"Hello!\");\nconv.add_assistant_message(\"Hi there!\");\n\n// Persist to disk\nconv.save(Path::new(\"conversation.json\"))?;\n```\n\n### Permissions\n\n```rust\nuse agent_core::permission::{PermissionActor, PermissionClient};\n\nlet (actor, tx) = PermissionActor::new();\nlet client = PermissionClient::new(\"session-id\".into(), tx);\n\n// Actor runs in background, client is used by tools to request permissions\ntokio::spawn(actor.run());\n```\n\n## Development\n\n```bash\ncargo build   # Build\ncargo test    # Run tests\ncargo clippy  # Lint\n```\n\n## Ecosystem\n\n- **[Omni CLI](https://github.com/omnidotdev/cli)**: Agentic CLI powered by Agent Core\n- **[Beacon](https://github.com/omnidotdev/beacon)**: Voice and messaging gateway powered by Agent Core\n- **[Omni Terminal](https://github.com/omnidotdev/terminal)**: GPU-accelerated terminal emulator built to run everywhere\n\n## License\n\nThe code in this repository is licensed under Apache 2.0, \u0026copy; [Omni LLC](https://omni.dev). See [LICENSE.md](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomnidotdev%2Fagent-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomnidotdev%2Fagent-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomnidotdev%2Fagent-core/lists"}