CLI Reference
Copy page
Complete reference for the Inkeep CLI commands
Overview
The Inkeep CLI is the primary tool for interacting with the Inkeep Agent Framework. It allows you to push agent configurations and interact with your multi-agent system.
Installation
Global Options
All commands support the following global options:
--version
- Display CLI version--help
- Display help for a command
Commands
inkeep init
Initialize a new Inkeep configuration file in your project.
Options:
--no-interactive
- Skip interactive path selection
Example:
inkeep push
Primary use case: Push a TypeScript file containing agent configurations to your server. This is the main workflow for deploying agents.
Arguments:
graph-path
- Path to the TypeScript file containing your agent graph
Options:
--tenant-id <id>
- Tenant ID (use with --api-url)--api-url <url>
- API URL (use with --tenant-id or alone to override config)--config-file-path <path>
- Path to configuration file
Project Validation
When pushing an agent graph, the CLI will automatically validate that the target project exists in your local database. This prevents accidentally pushing graphs to non-existent projects.
Behavior:
- The CLI checks if the project specified in your
inkeep.config.ts
exists - If the project doesn't exist, you'll be prompted to create it interactively
- You can provide a project name and optional description
- Once created, the push operation continues automatically
Example:
The CLI will:
- Parse and validate your TypeScript file
- Extract agent definitions and relationships
- Deploy the configuration to your server
- Make the agents available for interaction
inkeep pull
Pull an agent graph configuration from the server and save it locally as either a TypeScript or JSON file.
Arguments:
graph-id
- ID of the graph to pull from the server
Options:
--tenant-id <id>
- Tenant ID (use with --api-url)--api-url <url>
- API URL (use with --tenant-id or alone to override config)--config-file-path <path>
- Path to configuration file--output-path <path>
- Output directory for the generated file (default: ./agent-configurations)--json
- Output as JSON file instead of TypeScript--max-retries <number>
- Maximum number of retries for TypeScript generation (default: 3)
TypeScript Generation (Default)
By default, the pull command generates a TypeScript file using an LLM. This process includes:
- LLM Generation: Uses your configured model to convert the JSON graph data into TypeScript code
- Validation: Automatically validates the generated TypeScript by converting it back to JSON and comparing with the original
- Retry Logic: If validation fails, automatically retries with improved prompts (up to
--max-retries
times)
Example TypeScript generation:
JSON Output
Use the --json
flag to output the raw graph data as JSON without LLM processing:
Example JSON output:
Model Configuration
For TypeScript generation, you can configure an LLM model in your inkeep.config.ts
:
Default Model: If no model is specified in the configuration, the CLI defaults to anthropic/claude-4-sonnet-20250514
.
Supported Providers:
- Anthropic:
anthropic/claude-3-5-sonnet-20241022
,anthropic/claude-4-sonnet-20250514
, etc - OpenAI:
openai/gpt-4
,openai/gpt-4-turbo
, etc.
Minimal Configuration: You can omit the model
field to use the default:
Validation Process
When generating TypeScript files, the CLI performs automatic validation:
- Round-trip Test: Converts the generated TypeScript back to JSON
- Comparison: Compares the result with the original graph data
- Difference Detection: Identifies any discrepancies in structure or data
- Retry on Failure: Automatically retries with improved prompts if validation fails
- Detailed Reporting: Shows specific differences if validation ultimately fails
Example with validation:
inkeep chat
Start an interactive chat session with a deployed agent graph.
Arguments:
graph-id
- Optional graph ID (interactive selection if not provided)
Options:
--tenant-id <id>
- Tenant ID--api-url <url>
- API URL--config-file-path <path>
- Path to configuration file
Example:
inkeep list-graphs
List all available agent graphs for the current tenant.
Options:
--tenant-id <id>
- Tenant ID--api-url <url>
- API URL--config-file-path <path>
- Path to configuration file
Example:
inkeep config
Manage Inkeep configuration settings.
inkeep config get
Get configuration value(s).
Arguments:
key
- Optional configuration key to retrieve
Options:
--config-file-path <path>
- Path to configuration file
Example:
inkeep config set
Set a configuration value.
Arguments:
key
- Configuration keyvalue
- Configuration value
Options:
--config-file-path <path>
- Path to configuration file
Example:
inkeep config list
List all configuration values.
Options:
--config-file-path <path>
- Path to configuration file
Configuration File
The CLI uses a configuration file (typically inkeep.config.ts
or inkeep.config.json
) to store settings:
Configuration Priority
Configuration values are resolved in the following order:
- Command-line arguments
inkeep.config.ts
file- Environment variables
Environment Variables
The CLI respects the following environment variables:
INKEEP_API_URL
- Default API URLINKEEP_CONFIG_PATH
- Path to configuration fileDB_FILE_NAME
- Database file location (default:local.db
)
Database
The CLI uses a local SQLite database (local.db
by default) to store project and graph metadata. You can override the database location using the DB_FILE_NAME
environment variable:
Common Workflows
Deploy a New Agent Graph
- Create your agent configuration in TypeScript:
- Push the configuration:
- Start chatting:
Local Development Setup
- Initialize configuration:
- Start your local server:
- Push your agent configuration:
- Begin interactive chat:
Pull and Modify Existing Graph
- List available graphs:
- Pull an existing graph configuration:
- Edit the generated TypeScript file:
- Push your modifications:
- Test the updated graph:
Troubleshooting
Common Issues
Cannot connect to API:
- Verify your API URL is correct:
inkeep config get apiUrl
- Ensure your server is running if using local development
- Check network connectivity
Graph push fails:
- Ensure TypeScript file exports a valid agent graph
- Check for syntax errors in your configuration
- Verify all required agent properties are defined
Graph pull fails:
- Verify the graph ID exists:
inkeep list-graphs
- Ensure you have access to the graph with your current tenant/project configuration
- Check network connectivity to the API server
TypeScript generation fails:
- Ensure
modelConfig
is properly configured in yourinkeep.config.ts
(usesanthropic/claude-4-sonnet-20250514
by default if no model specified) - Check that your model provider (e.g., Anthropic) credentials are set up
- Try using
--json
flag as a fallback to get the raw graph data - Increase retry attempts:
inkeep pull graph-id --max-retries 5
Validation errors during pull:
- The generated TypeScript may have syntax errors or missing dependencies
- Check the generated file manually for obvious issues
- Try pulling as JSON first to verify the source data:
inkeep pull graph-id --json
- Consider using a different model in your
modelConfig
if issues persist
Project Not Found:
- If you see an error about a project not existing when pushing a graph:
- The CLI will prompt you to create the project
- Alternatively, ensure your
projectId
ininkeep.config.ts
matches an existing project - Check that your database file exists and is accessible
Database Connection Issues:
- Ensure the database file path is correct
- Check file permissions for the database
- Try using an absolute path for
DB_FILE_NAME
Getting Help
For additional help with any command:
For issues or feature requests, visit: GitHub Issues