# Cognee Codex API Evaluation

**Category:** Agent Memory
**Score:** 68 (C)

This is the agent-readable Devtool Arena evaluation page for Cognee on Codex API.

## Summary

| Metric | Value |
|--------|-------|
| Status | completed |
| Overall score | 68 |
| Grade | C |
| Eval score | 61 |
| Discovery score | 86 |
| Cost | $1.17 |
| Runtime | 6m 1s |
| Tool calls | 66 |
| Errors | 23 |
| Tokens used | 7666845 |
| Success | Yes |

## Agent-Readiness Checklist

| Signal | Evidence |
|--------|----------|
| Context7 | https://context7.com/topoteretes/cognee |
| llms.txt | https://cognee.ai/llms.txt |
| MCP server | https://github.com/topoteretes/cognee/tree/main/cognee-mcp |
| Typed SDK | Not found |
| OpenAPI | https://docs.cognee.ai/api-reference/openapi.json |
| Agent skills | https://github.com/topoteretes/cognee/blob/main/CLAUDE.md |
| CLI | https://docs.cognee.ai/cognee-cli/overview |

## Evaluation Prompt

````text

# Task
Using https://docs.cognee.ai, complete the following task:

Using the Cognee Python SDK, build me a long-term memory layer for an AI assistant and prove that, after the user corrects a fact in a later conversation, the assistant answers with the user's CURRENT state:

1. Install the official Cognee Python SDK (pip install) and initialize the client/memory store for a single user id "leaderboard-user".

2. Simulate CONVERSATION 1 by storing these facts for the user:
   - "My name is Sam and I live in Berlin."
   - "I am allergic to peanuts."
   - "I prefer window seats when I fly."

3. Simulate CONVERSATION 2 (a later session for the SAME user): the user says "I moved from Berlin to Amsterdam last month." Record this correction using whatever mechanism Cognee provides. Any idiomatic Cognee approach is acceptable — for example automatic reconciliation on add, an explicit update call, deleting/replacing the old fact, editing a memory block, or re-processing the memory graph. Do not force a specific mechanism; use the one Cognee is designed for.

4. Retrieve the memories relevant to this query: "Where does the user live and is there anything I should know before booking a restaurant for them?"

5. Print the result as JSON with these keys:
   - "query": the query string
   - "retrieved_memories": the list of memory strings Cognee returned for the query
   - "current_city": the user's current city, as reflected by what Cognee returned
   - "dietary_note": any dietary constraint, as reflected by what Cognee returned

The correction must be recorded through Cognee itself so that Cognee's own retrieval reflects the CURRENT state (Amsterdam, not Berlin) — for example by returning only the current location, or by marking the Berlin fact as outdated/superseded. It is NOT acceptable to store two contradictory facts and then have your own code (or a separate LLM call) pick the newer one; the resolution must come from Cognee. Use Cognee's own memory storage/retrieval primitives for steps 2-4 — do NOT keep the memories only in a local Python list, and do NOT make raw HTTP/REST calls. 

## Execution
After creating the script, run it to verify it works:
```bash
cd /home/daytona/app && python <your_script>.py
```

The script should print output to stdout. If there are errors, debug and fix them until it runs successfully.

````

## Grader Results

| Check | Passed | Weight | Score | Details |
|-------|--------|--------|-------|---------|
| Cost | No | 0 | 0 | $1.17 (≥$1.00, too expensive) |
| Time | No | 0 | 0 | 361s (5–10min, very slow) |
| Efficiency | No | 0 | 0 | 66 tool calls (>25, inefficient) |
| Found Docs | Yes | 0 | — | Touched docs at docs.cognee.ai: yes (43 matching tool calls) |
| Zero Errors | No | 0 | — | Tool outputs with errors/tracebacks: 23 |
| Syntax Valid | Yes | 0 | — | Code compiles/parses correctly |
| Created Files | Yes | 0 | — | Generated files: 2 (need ≥1) |
| Full Execution | Yes | 0 | — | Method: full_execution, Exit: 0 |

## Run Artifacts

| Artifact | Value |
|----------|-------|
| Conversation turns | 73 |
| Tool call traces | 66 |
| Generated files | 2 |
| Exit code | 0 |
| Completed at | 2026-09-27T02:10:20.905677+00:00 |

### Generated Files

- /home/daytona/app/memory_demo.py
- /home/daytona/app/requirements.txt

## Related Pages

- [Codex API leaderboard](/leaderboard/codex/api)
- [Compare Codex API companies](/leaderboard/codex/api/compare)
- [Agent Landscape](/leaderboard/discoverability)

Canonical URL: https://devtoolarena.com/codex/api/cognee
