Code Agent • Rust AI Agent SDK
CodeAgent: A specialized agent for code generation and execution.
CodeAgent
Defined in the agents module.
Rust AI Agent SDK
A specialized agent for code generation and execution.
Fields
| Name | Type | Description |
|---|---|---|
name | String | Agent name |
model | String | LLM model |
config | CodeConfig | Code configuration |
instructions | Option<String> | System instructions |
verbose | bool | Verbose output |
Methods
new
fn new() -> CodeAgentBuilderCreate a new CodeAgent builder
name
fn name(&self) -> &strGet agent name
generate
fn generate(&self, description: &str) -> Result<String>Generate code from a description (placeholder)
Parameters:
| Name | Type |
|---|---|
description | &str |
execute
fn execute(&self, _code: &str) -> Result<CodeExecutionResult>Execute code (placeholder – would require sandbox)
Parameters:
| Name | Type |
|---|---|
_code | &str |
review
fn review(&self, code: &str) -> Result<String>Review code (placeholder)
Parameters:
| Name | Type |
|---|---|
code | &str |
Source
View on GitHubpraisonai/src/agents/mod.rs at line 776