{"id":28506253,"url":"https://github.com/ai-robotic-labs/ai-agent-cli","last_synced_at":"2025-08-15T17:12:36.483Z","repository":{"id":296588608,"uuid":"991940460","full_name":"AI-Robotic-Labs/ai-agent-cli","owner":"AI-Robotic-Labs","description":"Rust library (with an optional CLI) implementing the Agent Life Cycle framework","archived":false,"fork":false,"pushed_at":"2025-06-16T10:38:06.000Z","size":24,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-11T21:45:58.566Z","etag":null,"topics":["agent","agenticalliance","ai","ai-agent","cli","command-line-tool","mvp"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/AI-Robotic-Labs.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}},"created_at":"2025-05-28T11:30:02.000Z","updated_at":"2025-08-04T09:29:06.000Z","dependencies_parsed_at":"2025-06-01T06:48:24.251Z","dependency_job_id":"7e48fc44-0337-41b1-bf3b-4bb9ad0f2776","html_url":"https://github.com/AI-Robotic-Labs/ai-agent-cli","commit_stats":null,"previous_names":["ai-robotic-labs/ai-agent-cli"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/AI-Robotic-Labs/ai-agent-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AI-Robotic-Labs%2Fai-agent-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AI-Robotic-Labs%2Fai-agent-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AI-Robotic-Labs%2Fai-agent-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AI-Robotic-Labs%2Fai-agent-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AI-Robotic-Labs","download_url":"https://codeload.github.com/AI-Robotic-Labs/ai-agent-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AI-Robotic-Labs%2Fai-agent-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270117999,"owners_count":24530297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"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","agenticalliance","ai","ai-agent","cli","command-line-tool","mvp"],"created_at":"2025-06-08T20:05:11.504Z","updated_at":"2025-08-15T17:12:36.458Z","avatar_url":"https://github.com/AI-Robotic-Labs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agent CLI\n\n[![crates.io](https://img.shields.io/crates/v/agent_cli)](https://crates.io/crates/agent_cli)\n\n**agent-cli** is a Rust library (with an optional CLI) implementing the **Agent Life Cycle** framework, inspired by the [sandy-mount/sandymount](https://github.com/sandy-mount/sandymount) Wiki. It provides a modular and reusable implementation for managing intelligent, autonomous software agents through their lifecycle phases: **Create**, **Add Skills**, **Configure**, **Run**, and **Shutdown**.\n\n---\n\n## Features\n\n* **Library Crate**: Core logic in `src/lib.rs` for creating and managing agents through lifecycle phases.\n* **Optional CLI**: Binary in `src/main.rs` (if included) allows running commands like `agent create my-agent`.\n* **Lifecycle Phases**:\n\n  * **Create**: Initialize an agent with a unique ID and name.\n  * **Add Skills**: Add capabilities (e.g., `\"memory\"`, `\"web-access\"`) to the agent.\n  * **Configure**: Set key-value configurations (e.g., goals, permissions).\n  * **Run**: Start the agent, displaying its skills and configuration.\n  * **Shutdown**: Save agent state to a JSON file and decommission the agent.\n* **Testing**: Comprehensive unit tests for all lifecycle phases.\n\n---\n\n## Installation\n\n### Prerequisites\n\n* [Rust](https://www.rust-lang.org/tools/install) (latest stable version, e.g., via `rustup`)\n* Cargo (included with Rust)\n\n### Setup\n\nClone or create the project:\n\n```bash\ngit clone https://github.com/AI-Robotic-Labs/ai-agent-cli.git\ncd agent-cli\n```\n\n**OR** create a new project:\n\n```bash\ncargo new agent-cli\ncd agent-cli\n```\n\nEnsure your `Cargo.toml` includes:\n\n```toml\n[package]\nname = \"agent-cli\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\nserde = { version = \"1.0\", features = [\"derive\"] }\nserde_json = \"1.0\"\nrand = \"0.8\"\n```\n\n* Place the library code in `src/lib.rs` (see [Project Structure](#project-structure)).\n* (Optional) Add `src/main.rs` for CLI functionality.\n\n### Build\n\n```bash\ncargo build\n```\n\n---\n\n## Usage\n\n### As a Library\n\nThe core functionality is in `src/lib.rs`, which defines the `AgentCLI` struct and its lifecycle methods. Use it in another Rust project by adding `agent-cli` as a dependency in your `Cargo.toml`:\n\n```toml\n[dependencies]\nagent-cli = { path = \"/path/to/agent-cli\" }\n```\n\nExample usage:\n\n```rust\nuse agent_cli::AgentCLI;\n\nfn main() {\n    let mut cli = AgentCLI::new();\n    cli.create(\"my-agent\").unwrap();\n    cli.add_skill(\"memory\").unwrap();\n    cli.configure(\"goal\", \"assist user\").unwrap();\n    cli.run().unwrap();\n    cli.shutdown().unwrap();\n}\n```\n\n---\n\n### As a CLI (Optional)\n\nIf `src/main.rs` is included, you can run commands like:\n\n```bash\ncargo run -- create my-agent\ncargo run -- skill add memory\ncargo run -- skill add web-access\ncargo run -- config goal \"assist user\"\ncargo run -- run\ncargo run -- shutdown\n```\n\n**Example Output:**\n\n```\nCreated agent: my-agent (ID: agent-\u003crandom_number\u003e)\nAdded skill 'memory' to agent my-agent\nAdded skill 'web-access' to agent my-agent\nConfigured goal = assist user for agent my-agent\nRunning agent my-agent (ID: agent-\u003crandom_number\u003e)\nActive skills: [\"memory\", \"web-access\"]\nConfiguration: {\"goal\": \"assist user\"}\nAgent shutdown and state saved\n```\n\nThe `shutdown` command saves the agent state to a JSON file (e.g., `agent-\u003crandom_number\u003e.json`).\n\n---\n\n## Testing\n\nRun unit tests in `src/lib.rs`:\n\n```bash\ncargo test\n```\n\n**Example Output:**\n\n```\nrunning 5 tests\ntest tests::test_create_agent ... ok\ntest tests::test_add_skill ... ok\ntest tests::test_configure ... ok\ntest tests::test_run ... ok\ntest tests::test_shutdown ... ok\n\ntest result: ok. 5 passed; 0 failed\n```\n\n---\n\n## Project Structure\n\n```\nagent-cli/\n├── Cargo.toml\n└── src/\n    ├── lib.rs   # Core library with AgentCLI and lifecycle logic\n    └── main.rs  # Optional CLI binary (add for CLI usage)\n```\n\n---\n\n## Contributing\n\n* Report issues or suggest features via [GitHub Issues](https://github.com/\u003cyour-repo\u003e/issues).\n* Submit pull requests with improvements or additional lifecycle phases (e.g., **Scale**, **Monitor**).\n\n---\n\n## License\n\nMIT License. See [LICENSE](./LICENSE) for details.\n\n---\n\n## Acknowledgments\n\n* Inspired by the **Agent Life Cycle** from [sandy-mount/sandymount](https://github.com/sandy-mount/sandymount).\n* Built with Rust for modularity and safety.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-robotic-labs%2Fai-agent-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fai-robotic-labs%2Fai-agent-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-robotic-labs%2Fai-agent-cli/lists"}