Expand description
§corrosive_agents
Build verifiable, interactive AI agents powered by NVIDIA Nemotron free LLM models.
§Highlights
- Builder pattern — assemble an
Agentfluently withAgentBuilder. - JSON manifests — an agent’s name, version, capabilities, skills and
MCP servers load from a JSON file (
AgentManifest). - Verifiable identity — Ed25519 signatures over the manifest
(
identity::AgentIdentity); anyone can verify an agent with its public key. - NVIDIA NIM client — chat + streaming + embeddings against the
OpenAI-compatible
integrate.api.nvidia.comendpoint (llm::NvidiaClient). - Skills & MCP — native async
skills::Skills plus a Model Context Protocol stdio client. - Multi-transport — Tokio REST API + WebSocket (feature
server), and gRPC (featuregrpc). - Vector stores — one
vector::VectorStoretrait; Pinecone (featurepinecone), Qdrant (featureqdrant), an in-memory reference implementation, or your own custom store.
§Quickstart
use corrosive_agents::prelude::*;
let agent = Agent::builder()
.name("research-agent")
.version("0.1.0")
.description("Answers research questions")
.capability(Capability::new("chat", "Conversational Q&A"))
.llm(NvidiaClient::from_env()?.with_model(models::LLAMA_NEMOTRON_SUPER_49B))
.generate_identity()
.build()?;
let reply = agent.chat("session-1", "What is Rust?").await?;
println!("{reply}");§Feature flags
| Feature | Default | Enables |
|---|---|---|
server | yes | REST + WebSocket serving (axum) |
grpc | no | gRPC serving (tonic, vendored protos) |
pinecone | no | Pinecone vector store backend |
qdrant | no | Qdrant vector store backend |
full | no | All of the above |
Re-exports§
pub use agent::Agent;pub use agent::AgentBuilder;pub use agent::AgentInfo;pub use agent::AgentManifest;pub use agent::Capability;pub use error::Error;pub use error::Result;
Modules§
- a2a
- Agent-to-agent (A2A) delegation.
- agent
- The agent core: manifest, capabilities, builder, and runtime.
- auth
grpcorserver - Authentication for agent transports (features
server/grpc). - error
- Unified error and result types for the crate.
- grpc
grpc - gRPC serving (tonic), enabled with feature
grpc. - identity
- Agent identity: Ed25519 keypairs for signing and verifying agents.
- llm
- LLM integration: provider traits, chat types, and the NVIDIA NIM client.
- mcp
- Model Context Protocol (MCP) support.
- prelude
- Convenient glob-import for the most commonly used types.
- server
server - REST + WebSocket serving (Tokio/axum), enabled with feature
server(on by default). - session
- Session stores: pluggable persistence for conversation history.
- skills
- Skills: named, typed, async abilities an agent can execute on demand.
- tls
tls - TLS configuration helpers (feature
tls). - trust
- Key rotation, revocation, and trust decisions for agent identities.
- tutorial
- The step-by-step tutorial: from an empty project to a production-shaped
agent. Rendered from
docs/TUTORIAL.md; its core code blocks are compile-checked as doctests. - vector
- Vector stores for retrieval-augmented agents.
- x509
x509 - X.509 certificate-based identity (feature
x509).