Expand description
Nucel Agent SDK — Core
Provider-agnostic traits and types for AI coding agents. Implement
AgentExecutor and SessionImpl to add support for any coding-agent
backend (CLI subprocess, HTTP server, in-process library, …).
Most application code should depend on the umbrella crate
nucel-agent-sdk rather than this
crate directly. Depend on nucel-agent-core only if you are:
- Writing a new provider and want the bare trait surface, or
- Embedding the abstraction into something that should stay agnostic to which providers are compiled in.
§Minimal example
With a real provider plugged in (see
crates/unified/examples/claude_basic.rs in the workspace),
the shape of a session is:
use nucel_agent_core::{AgentExecutor, SpawnConfig};
use std::path::Path;
let session = executor.spawn(
Path::new("/my/repo"),
"What does this codebase do?",
&SpawnConfig { budget_usd: Some(1.0), ..Default::default() },
).await?;
let resp = session.query("Now write me a one-line summary.").await?;
println!("{}", resp.content);
session.close().await?;§See also
- Workspace README
docs/architecture.mdCONTRIBUTING.md— how to add a new provider.
Re-exports§
pub use error::AgentError;pub use error::Result;pub use executor::AgentCapabilities;pub use executor::AgentExecutor;pub use executor::AvailabilityStatus;pub use executor::ExecutorConfig;pub use executor::SpawnConfig;pub use session::AgentSession;pub use session::EventStream;pub use session::SessionImpl;pub use session::SessionMetadata;pub use types::AgentCost;pub use types::AgentResponse;pub use types::CachePoint;pub use types::ExecutorType;pub use types::HookConfig;pub use types::HookHandler;pub use types::MessageEvent;pub use types::PermissionMode;pub use types::ToolCall;pub use types::ToolResult;