Skip to main content

Crate corrosive_agents

Crate corrosive_agents 

Source
Expand description

§corrosive_agents

Build verifiable, interactive AI agents powered by NVIDIA Nemotron free LLM models.

§Highlights

  • Builder pattern — assemble an Agent fluently with AgentBuilder.
  • 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.com endpoint (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 (feature grpc).
  • Vector stores — one vector::VectorStore trait; Pinecone (feature pinecone), Qdrant (feature qdrant), 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

FeatureDefaultEnables
serveryesREST + WebSocket serving (axum)
grpcnogRPC serving (tonic, vendored protos)
pineconenoPinecone vector store backend
qdrantnoQdrant vector store backend
fullnoAll 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.
authgrpc or server
Authentication for agent transports (features server / grpc).
error
Unified error and result types for the crate.
grpcgrpc
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.
serverserver
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.
tlstls
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.
x509x509
X.509 certificate-based identity (feature x509).