Core Concepts
Understand the fundamental concepts of RunAgent
Overview
RunAgent is built on several core concepts that make it powerful yet simple to use. Understanding these concepts will help you build better agents and use the platform effectively.
Agents
An agent in RunAgent is a deployable AI application that:
- Processes inputs and returns outputs
- Can use tools and external APIs
- Maintains state across interactions
- Runs in a secure, isolated environment
Agent Lifecycle
Development
Write and test your agent code locally
Configuration
Define how RunAgent should interact with your code
Deployment
Upload and run your agent on RunAgent infrastructure
Execution
Invoke your agent via API, SDK, or CLI
Entrypoints
Entrypoints are the functions RunAgent calls to interact with your agent:
Types of Entrypoints
Type | Purpose | Input | Output |
---|---|---|---|
generic | Standard request/response | Dict | Dict |
generic_stream | Streaming responses | Dict | Generator[str] |
async | Asynchronous processing | Dict | Awaitable[Dict] |
batch | Batch processing | List[Dict] | List[Dict] |
Configuration
The runagent.config.json
file is the contract between your code and RunAgent:
Key Configuration Elements
Agent Metadata
Name, version, description, and framework
Entrypoints
How RunAgent calls your code
Environment
Variables and secrets management
Resources
Memory, CPU, and timeout settings
Frameworks
RunAgent supports multiple AI frameworks:
Execution Modes
Local Development
- Runs on your machine
- Hot reload support
- Direct access to logs
- Perfect for testing
Production Deployment
- Runs on RunAgent infrastructure
- Automatic scaling
- Monitoring and logging
- High availability
Security Model
Data Flow
Understanding how data flows through RunAgent:
Best Practices
Agent Design
- Stateless when possible: Design agents to be stateless for better scaling
- Idempotent operations: Same input should produce same output
- Error handling: Always handle and return meaningful errors
- Timeout awareness: Respect execution time limits
Resource Usage
Security
- Never hardcode secrets
- Validate all inputs
- Sanitize outputs
- Use least privilege principle
Common Patterns
Request-Response Pattern
Streaming Pattern
Tool Usage Pattern
Next Steps
Now that you understand the core concepts: