agentforge
llms.txt4 starsChanged 9 months agoApache-2.0Archived repositoryView on GitHub
This document provides a comprehensive overview of the AgentForge project, its architecture, codebase, and development practices. Use this as your primary source of truth for understanding and contributing to the project. The project is a pnpm monorepo with the following structure: This is the heart of the framework. It provides the core primitives for building agents. Key Exports: - Agent: The main class for creating and interacting with an agent. - SandboxManager: Manages the lifecycle of E2B sandboxes for secure…
In this repository62 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agentforge-a2aSkill
- agentforge-browser-toolingSkill
- agentforge-channel-adaptersSkill
- agentforge-cliSkill
- agentforge-convexSkill
- agentforge-dashboardSkill
- agentforge-mcp-integrationSkill
- agentforge-research-orchestratorSkill
- agentforge-runtime-daemonSkill
- agentforge-sandbox-executionSkill
- agentforgeSkill
- agentforge-skills-marketplaceSkill
- agentforge-template-syncSkill
- agentforge-testingSkill
- convex-advisorSkill
- convex-auth-setupSkill
- convex-best-practicesSkill
- convex-component-authoringSkill
- convex-components-guideSkill
- convex-cron-jobsSkill
- convex-file-storageSkill
- convex-function-creatorSkill
- convex-helpers-guideSkill
- convex-http-actionsSkill
- convex-mcp-setupSkill
- convex-migration-helperSkill
- convex-quickstartSkill
- convex-realtimeSkill
- convex-reviewerSkill
- convex-schema-builderSkill
- convex-security-auditSkill
- convex-security-checkSkill
- convexSkill
- mastraSkill
- specsafe-agentforgeSkill
- specsafeSkill
- specSkill
- validateSkill
- working-with-sqliteSkill
- agentforge-convexSkill
- gh-workflowSkill
- spec-createSkill
- specsafe-agentforgeSkill
- specsafe-doneSkill
- specsafe-exploreSkill
- specsafe-newSkill
- specsafeSkill
- specsafe-specSkill
- specsafe-test-applySkill
- specsafe-test-createSkill
- specsafe-verifySkill
- specSkill
- template-sync-checkSkill
- validateSkill
- working-with-sqliteSkill
- agentforge-convexSkill
- browser-automationSkill
- example-skillSkill
- skill-creatorSkill
- The first 60 shown.
The file
We split this llms.txt into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 122
Write tests: Add or update tests in the corresponding *.test.ts file.
- Very specific: line 125
Commit: Use conventional commit messages (e.g., feat:, fix:, docs:).
- Very specific: line 131
Create a specification document in specs/.
≈ “Common” is an estimate: at least 1 in 5 of the 1,484 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
# AgentForge Project Context (for LLMs)
This document provides a comprehensive overview of the AgentForge project, its architecture, codebase, and development practices. Use this as your primary source of truth for understanding and contributing to the project.
## 1. High-Level Overview
- **Project Name**: AgentForge
- **Tagline**: The Minimalist Framework for Collaborative AI Agents
- **Philosophy (NanoClaw Edition)**: A focused, core implementation designed for developers who need a robust, secure, and scalable foundation for their AI agent applications.
- **Core Technologies**: Mastra (agent orchestration), Convex (real-time database), E2B (secure code execution sandbox).
- **Monorepo Structure**: Managed with pnpm workspaces.
- **Language**: TypeScript
- **Testing**: Vitest with 100% test coverage enforced.
- **CI/CD**: GitHub Actions for testing and deployment.
## 2. Monorepo Structure and Packages
The project is a pnpm monorepo with the following structure:
```
/agentforge
├── convex/ # Convex backend schema and functions
├── docs/ # Project documentation
├── examples/
│ └── finforge/ # Example financial intelligence agent
├── packages/
│ ├── core/ # @agentforge-ai/core: Main framework logic
│ └── cli/ # @agentforge-ai/cli: Scaffolding and management tool
├── specs/ # Feature specifications
├── CHANGELOG.md
├── package.json # Root package.json
└── pnpm-workspace.yaml
```
### 2.1. `@agentforge-ai/core`
This is the heart of the framework. It provides the core primitives for building agents.
**Key Exports:**
- `Agent`: The main class for creating and interacting with an agent.
- `SandboxManager`: Manages the lifecycle of E2B sandboxes for secure code execution.
- `MCPServer`: A server for registering and invoking tools that agents can use.
- `Tool` (interface): The definition for a tool that can be registered with the `MCPServer`.
**Dependencies:**
- `@mastra/core`: For agent orchestration and LLM interaction.
- `@e2b/code-interpreter`: For the secure sandbox environment.
- `ai`: Vercel AI SDK for language model integration.
- `zod`: For defining and validating tool input/output schemas.
### 2.2. `@agentforge-ai/cli`
This package provides the command-line interface for managing AgentForge projects.
**Commands:**
- `agentforge create <project-name>`: Scaffolds a new AgentForge project from a template.
- `agentforge run`: Starts the local Convex development server.
- `agentforge deploy`: Deploys the Convex backend to production, with support for environment variables, dry runs, and rollbacks.
### 2.3. `convex/`
This directory contains the data model and backend logic for an AgentForge project, running on the Convex platform.
**Schema (`convex/schema.ts`):**
- `agents`: Stores agent configurations.
- `threads`: Represents conversations or tasks.
- `messages`: Stores the messages within a thread (user, assistant, system, tool).
**Functions:**
- `agents.ts`, `threads.ts`, `messages.ts`: Contain Convex mutations and queries for creating and retrieving data.
## 3. Core Concepts and APIs
### 3.1. The `Agent` Class (`@agentforge-ai/core`)
This is the central abstraction. It wraps `@mastra/core` and provides a simple interface for agent interaction.
**Constructor:**
```typescript
new Agent(config: AgentConfig)
```
**`AgentConfig` Interface:**
- `id`: A unique identifier for the agent.
- `name`: A human-readable name.
- `instructions`: The system prompt for the agent.
- `model`: The language model to use. Can be a string (e.g., "openai/gpt-4o-mini") or a `LanguageModelV1` instance from the Vercel AI SDK.
- `tools` (optional): An `MCPServer` instance containing the tools available to the agent.
**Key Method:**
- `generate(prompt: string)`: Runs the agent with a given prompt and returns the result, including text output and any tool calls.
### 3.2. The `SandboxManager` Class (`@agentforge-ai/core`)
Provides a pool of E2B sandboxes for executing tool code securely.
**Key Methods:**
- `runCode(code: string)`: Executes a snippet of Python code in a sandbox and returns the output.
- `cleanup()`: Terminates all active sandboxes.
### 3.3. The `MCPServer` Class (`@agentforge-ai/core`)
Manages the tools available to an agent.
**Key Methods:**
- `registerTool(tool: Tool)`: Registers a new tool.
- `listTools()`: Returns a JSON schema of all registered tools, suitable for passing to an LLM.
- `callTool(toolName: string, input: unknown)`: Invokes a tool with the given input.
**`Tool` Interface:**
- `name`: The name of the tool.
- `description`: A description of what the tool does.
- `inputSchema`: A Zod schema for the tool's input.
- `outputSchema`: A Zod schema for the tool's output.
- `handler`: An async function that implements the tool's logic.
## 4. Development Workflow
1. **Get latest code**: `git pull origin main`
2. **Install dependencies**: `pnpm install`
3. **Make changes**: Edit files in `packages/` or other directories.
4. **Write tests**: Add or update tests in the corresponding `*.test.ts` file. All new code must be covered by tests.
5. **Run tests**: `pnpm test` or `pnpm test:coverage`.
6. **Build**: `pnpm build`.
7. **Commit**: Use conventional commit messages (e.g., `feat:`, `fix:`, `docs:`).
## 5. How to Contribute
- **Bug Fixes**: Find an open issue, or create a new one. Submit a pull request with the fix and a corresponding test.
- **New Features**:
1. Create a specification document in `specs/`.
2. Get approval on the spec.
3. Implement the feature following the TDD workflow.
4. Submit a pull request.
## 6. Key Project Files
- `README.md`: High-level project overview.
- `CHANGELOG.md`: Version history and release notes.
- `docs/`: In-depth guides and tutorials.
- `examples/finforge/`: A complete, working example project that is excellent for understanding how all the pieces fit together.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

