Skip to main content

Profile and classify agent behavior patterns from traces

Project description

Agent Profiler

License: MIT Python 3.10+ Tests

Profile and classify agent behavior patterns from traces using transition matrices and tool distributions.

Installation

pip install agent-profiler

Quick Start

Profile a Session

# Profile and classify behavior
aprof profile trace.jsonl

# Save results to JSON
aprof profile trace.jsonl -o results.json

Classify Behavior

aprof classify trace.jsonl

Generate Visualizations

aprof visualize trace.jsonl --output profile_chart.png

Programming API

from agent_profiler import AgentProfiler, BehaviorClassifier, ProfileVisualizer

# Profile a session
profiler = AgentProfiler()
result = profiler.profile("trace.jsonl")
print(f"Category: {result.category} (confidence: {result.confidence:.1%})")
print(f"Tool distribution: {result.tool_distribution.tool_counts}")

# Classify directly
classifier = BehaviorClassifier()
category, confidence, scores = classifier.classify(
    edit_ratio=0.25, read_ratio=0.15, bash_ratio=0.30,
    error_rate=0.4, error_recovery_rate=0.35
)

# Generate visualizations
visualizer = ProfileVisualizer()
visualizer.generate_profile_chart(result, output="profile.png")
visualizer.generate_transition_heatmap("trace.jsonl", output="heatmap.png")
visualizer.generate_tool_distribution_pie("trace.jsonl", output="tools.png")

Behavior Categories

Category Description Key Indicators
Debugging Active debugging sessions High Edit+Bash, many errors, recoveries
Building Feature development High Write+Bash, low Read
Exploring Code investigation High Read+Grep, low Edit
Lost Confused/circular behavior Circular transitions, high Read
Verifying Change verification Read after Edit, test runs

License

MIT

Ecosystem

Part of the FableForge ecosystem — 21 open-source projects built from 210K real agent traces:

Project Description
Anvil Self-verified coding agent
VerifyLoop Plan→Execute→Verify→Recover framework
ErrorRecovery Self-healing middleware (3,725 error patterns)
FableForge-14B The fine-tuned 14B model (4-stage training)
ShellWhisperer 1.5B edge agent (phone/RPi, 50ms)
ReasonCritic Verification model (130 benchmark tasks)
TraceCompiler Compile traces → LoRA skills
AgentRuntime Persistent agent daemon (systemd for AI)
AgentSwarm Multi-agent from real trace transitions
AgentTelemetry Datadog for agents (token tracking, costs)
BenchAgent HumanEval for tool-use (107 tasks)
AgentDev VSCode extension with verification
TraceViz Trace replay visualizer (Next.js)
AgentSkills npm for agent behaviors
AgentCurriculum 5-stage progressive training
AgentFuzzer Adversarial testing for agents
AgentConstitution Safety guardrails from traces
CostOptimizer Token cost reduction (50-80%)
AgentProfiler Behavioral fingerprinting
TrajectoryDistiller Trace→training data pipeline
Fable5-Dataset HuggingFace dataset release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fableforge_agent_profiler-0.1.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fableforge_agent_profiler-0.1.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file fableforge_agent_profiler-0.1.0.tar.gz.

File metadata

File hashes

Hashes for fableforge_agent_profiler-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eac07dd979099f9a92b56c0f74b13b0f9591656b7e4767c47752b79a58ba79fd
MD5 c6b70b8ccb798ad6aefc0b272a5f2adb
BLAKE2b-256 9dce9738bb52fd03894d25ba3397a87cb7e4d25844d4184a8b61eb2bc555c8a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for fableforge_agent_profiler-0.1.0.tar.gz:

Publisher: release.yml on KingLabsA/agent-profiler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fableforge_agent_profiler-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fableforge_agent_profiler-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f09f4cba9491d10536210bb5dcf787d8ce749405c52c2155001b0296a370d4b5
MD5 879b24bc28ed19494b7002bc3a7895ba
BLAKE2b-256 1874ff8daa1c2fba66dfe6a58aac673911713454e149a16ec7f0dd24e1e0f809

See more details on using hashes here.

Provenance

The following attestation bundles were made for fableforge_agent_profiler-0.1.0-py3-none-any.whl:

Publisher: release.yml on KingLabsA/agent-profiler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page