API Reference
Programmatic interfaces for Arc Memory SDK
Arc Memory API Reference
Welcome to the Arc Memory SDK API Reference. This section provides detailed documentation for the programmatic interfaces of Arc Memory, allowing you to integrate knowledge graph capabilities into your own applications and workflows.
Beta Release: Arc Memory SDK is currently in beta. We’re actively gathering feedback and improving the platform.
The Arc Memory API is designed to be intuitive and consistent, following Python best practices and providing comprehensive type hints for better IDE integration.
API Overview
Build Process API
Create and update knowledge graphs from various data sources
Trace API
Query and traverse the knowledge graph to trace history
Data Models
Core data structures used throughout the API
Plugin Architecture
Extend Arc Memory with custom data sources
Getting Started with the API
Installation
First, install Arc Memory:
Import the library
Initialize Arc Memory
Use the API
API Sections
Core Functions
build()
: Build a complete knowledge graphbuild_incremental()
: Update an existing graphclean()
: Remove existing graph data
Key Features
- Multi-source data ingestion
- Incremental builds for efficiency
- Plugin system for extensibility
Core Functions
build()
: Build a complete knowledge graphbuild_incremental()
: Update an existing graphclean()
: Remove existing graph data
Key Features
- Multi-source data ingestion
- Incremental builds for efficiency
- Plugin system for extensibility
Core Functions
trace_file()
: Trace history of a file or linetrace_commit()
: Find related data for a committrace_pr()
: Find related data for a PR
Key Features
- Bi-directional traversal
- Customizable depth and filters
- Rich result metadata
Core Models
Node
: Base class for all graph nodesEdge
: Base class for all graph edgesBuildManifest
: Build metadata
Key Features
- Type-safe interfaces
- Serialization support
- Extensible for custom data
Core Interfaces
IngestorPlugin
: Base class for data ingestorsPluginRegistry
: Plugin managementPluginContext
: Shared plugin state
Key Features
- Entry point-based discovery
- Standardized interfaces
- Incremental data support
Complete Example
API Best Practices
Error Handling
Use try/except blocks to handle potential exceptions:
Performance
For large repositories:
- Use incremental builds
- Limit query depth
- Apply specific filters
Extensibility
Create custom plugins by implementing the IngestorPlugin
interface:
For detailed API documentation, explore the specific API sections linked above.