| status | stable |
|---|
Complete reference for the AgenticTime Rust and Python APIs.
The primary struct for interacting with an AgenticTime temporal graph. Each TimeGraph corresponds to a single .atime file.
use agentic_time_core::TimeGraph;
let mut graph = TimeGraph::open("project.atime")?;Opens an existing time graph or creates a new one at the given path.
Creates a new empty time graph. Fails if the file already exists.
Persists all in-memory changes to disk.
Returns statistics: deadline count, schedule count, sequence count, decay config count, total entities.
use agentic_time_core::{Deadline, Priority, DeadlineStatus};
let deadline = Deadline::new(
"Ship v1.0",
"2026-03-15T17:00:00Z".parse()?,
Priority::High,
);
graph.add_deadline(deadline)?;| Field | Type | Description |
|---|---|---|
id |
u64 |
Auto-assigned unique identifier |
title |
String |
Human-readable deadline title |
due_at |
DateTime<Utc> |
UTC deadline timestamp |
priority |
Priority |
Low, Medium, High, Critical |
status |
DeadlineStatus |
Pending, InProgress, Completed, Missed, Cancelled |
tags |
Vec<String> |
User-defined tags |
depends_on |
Vec<u64> |
IDs of prerequisite deadlines |
use agentic_time_core::{DurationEstimate, Confidence};
let estimate = DurationEstimate::new(
"Auth refactor",
Duration::from_secs(8 * 3600),
Confidence::new(0.7),
);
graph.add_duration(estimate)?;| Field | Type | Description |
|---|---|---|
id |
u64 |
Auto-assigned unique identifier |
label |
String |
What is being estimated |
estimate |
Duration |
Best-estimate duration |
confidence |
f64 |
Confidence level (0.0 to 1.0) |
actual |
Option<Duration> |
Actual elapsed time (if tracked) |
started_at |
Option<DateTime<Utc>> |
When tracking started |
completed_at |
Option<DateTime<Utc>> |
When tracking ended |
use agentic_time_core::{Schedule, Recurrence};
let schedule = Schedule::new(
"Weekly code review",
Recurrence::Weekly { day: Weekday::Tue, hour: 10, minute: 0 },
Duration::from_secs(2 * 3600),
);
graph.add_schedule(schedule)?;use agentic_time_core::Sequence;
let mut seq = Sequence::new("Deploy pipeline");
seq.add_step("Run tests", Duration::from_secs(600))?;
seq.add_step("Build artifacts", Duration::from_secs(300))?;
seq.add_step("Deploy to staging", Duration::from_secs(120))?;
seq.add_step("Smoke tests", Duration::from_secs(180))?;
seq.add_step("Deploy to production", Duration::from_secs(60))?;
graph.add_sequence(seq)?;use agentic_time_core::{DecayConfig, DecayCurve};
let config = DecayConfig::new(
"memory-freshness",
DecayCurve::Exponential { halflife_hours: 168.0 },
);
graph.set_decay(config)?;pip install agentic-timefrom agentic_time import TimeGraph
tg = TimeGraph("project.atime")Adds a deadline. Returns the deadline ID.
Adds a duration estimate. Returns the estimate ID.
Adds a schedule entry. Returns the schedule ID.
Creates a new empty sequence. Returns the sequence ID.
Adds a step to an existing sequence.
Configures a named decay curve.
Returns the freshness value (0.0 to 1.0) for a given age.
Returns graph statistics.
Persists changes to disk.