Madjik API documentation

Using the Madjik API for A2A

Madjik as the shared source of truth for agent networks.

A2A (Agent-to-Agent) protocols let AI agents cooperate. The Madjik API exposes an agent card and an execute endpoint following Google's A2A specification, so a network of agents — e.g. a sentiment agent, a risk agent and an execution agent — can share one consistent, timestamped data layer.

Discovery

curl "https://api.madjik.io/a2a/agent.json"

The card lists three capabilities: get_metrics, get_timeseries and analyze_market (a signal roll-up across a focus area: risk, sentiment, momentum or volatility), plus the auth scheme (X-API-Key).

Execution

curl -X POST -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{"capability": "analyze_market", "parameters": {"focus": "risk"}}' \
  "https://api.madjik.io/a2a/execute"

{
  "success": true,
  "result": {
    "focus": "risk",
    "metrics_analyzed": 4,
    "signals": { "M50016": { "name": "...", "value": ..., "signal": "neutral" } },
    "overall_signal": "neutral"
  },
  "execution_id": "exec_..."
}

Best practices

  • One shared source — point every agent at the same Madjik data so they argue about conclusions, not inputs
  • Same time window — have agents reference payload timestamps, not "now"
  • Audit trail — log each agent decision with the underlying Madjik payload and its provenance
  • Conflict resolution — define rules for when agents disagree; method divergence (see /v1/metrics/{id}/methods) is itself information